We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4aaf2ca commit 3e0db3aCopy full SHA for 3e0db3a
target/common/test/ipc.cc
@@ -102,8 +102,8 @@ IpcIface::IpcIface(int argc, char** argv) {
102
char* tx = strtok(ipc_args, ",");
103
char* rx = strtok(NULL, ",");
104
// Store arguments persistently
105
- targs.tx = (char*)malloc(strlen(tx));
106
- targs.rx = (char*)malloc(strlen(rx));
+ targs.tx = (char*)malloc(strlen(tx) + 1);
+ targs.rx = (char*)malloc(strlen(rx) + 1);
107
strcpy(targs.tx, tx);
108
strcpy(targs.rx, rx);
109
// Initialize IO thread which will handle TX, RX pipes
0 commit comments