BIOS: Fixed NameServerRemoteRpmsg MessageQ instanceName and name length 3.00.00.16_eng
authorArnie Reynoso <arnier@ti.com>
Fri, 19 Apr 2013 18:40:31 +0000 (11:40 -0700)
committerChris Ring <cring@ti.com>
Tue, 23 Apr 2013 18:51:08 +0000 (11:51 -0700)
    The MessageQ instanceName and name length wasn't taking into account the
    string's termination character causing instances where the MessageQ name
    couldn't be located (MessageQ_open(ed) on the slave core.

packages/ti/ipc/namesrv/NameServerRemoteRpmsg.c

index b0f08e59c93e598ed22f89b1e4f626875ccd4045..28e2926aede17dae7b24fcf13cfbc6e1a215ffdb 100644 (file)
@@ -183,11 +183,11 @@ Int NameServerRemoteRpmsg_get(NameServerRemoteRpmsg_Object *obj,
 
     len = strlen(instanceName);
     Assert_isTrue(len < MAXNAMEINCHAR, NameServerRemoteRpmsg_A_nameIsTooLong);
-    strncpy((Char *)msg.instanceName, instanceName, len);
+    strncpy((Char *)msg.instanceName, instanceName, len+1);
 
     len = strlen(name);
     Assert_isTrue(len < MAXNAMEINCHAR, NameServerRemoteRpmsg_A_nameIsTooLong);
-    strncpy((Char *)msg.name, name, len);
+    strncpy((Char *)msg.name, name, len+1);
 
     Log_print3(Diags_INFO, FXNN": Requesting from procId %d, %s:%s...\n",
                obj->remoteProcId, (IArg)msg.instanceName, (IArg)msg.name);