summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Nelson <sam.nelson@ti.com>2019-10-28 17:30:51 -0400
committerSam Nelson <sam.nelson@ti.com>2019-10-28 17:43:18 -0400
commit1d53b856338b86d1979fe09345c0b382913a848a (patch)
treee800a9956cd28aca21ece89cd58c6dc402c6844a
parent2448dc36df7d0c00d0f7747acdb749773c09be8e (diff)
downloadipc-1d53b856338b86d1979fe09345c0b382913a848a.tar.gz
test_omx: Add null termination to avoid out of bound access3.50.04.08
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rw-r--r--packages/ti/ipc/tests/test_omx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/ti/ipc/tests/test_omx.c b/packages/ti/ipc/tests/test_omx.c
index 9f2553f..a77cc5a 100644
--- a/packages/ti/ipc/tests/test_omx.c
+++ b/packages/ti/ipc/tests/test_omx.c
@@ -169,6 +169,8 @@ static RPC_OMX_ERRORTYPE RPC_SKEL_GetHandle(Void *srvc, UInt32 size,
strncpy(cComponentName, (char *)((UArg)data + sizeof(map_info_type)),
sizeof(cComponentName)-1);
+ /* Add NULL to terminate string */
+ cComponentName[127] = '\0';
#if CHATTER
System_printf("RPC_SKEL_GetHandle: Component Name received: %s\n",