From 74801d8c2821c212cbc79b83b4513463131a80dd Mon Sep 17 00:00:00 2001 From: rdkdevpilot Date: Fri, 10 Jul 2026 17:54:30 -0400 Subject: [PATCH] Fix BUFFER_SIZE in rbusTableProvider.c Defect ID: b98120cd-64be-4bd6-9796-eb892770bfc3 --- sampleapps/provider/rbusTableProvider.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sampleapps/provider/rbusTableProvider.c b/sampleapps/provider/rbusTableProvider.c index 3edf0a5f..845aaab2 100644 --- a/sampleapps/provider/rbusTableProvider.c +++ b/sampleapps/provider/rbusTableProvider.c @@ -396,7 +396,8 @@ rbusError_t setHandler2(rbusHandle_t handle, rbusProperty_t property, rbusSetHan if(propertyNameEquals(name, "Data")) { - strncpy(t2->data, rbusValue_GetString(value, NULL), MAX_LENGTH); + strncpy(t2->data, rbusValue_GetString(value, NULL), MAX_LENGTH-1); + t2->data[MAX_LENGTH-1] = '\0'; printDataModel(); return RBUS_ERROR_SUCCESS; } @@ -477,4 +478,4 @@ int main(int argc, char *argv[]) exit2: printf("provider: exit\n"); return rc; -} +} \ No newline at end of file