We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86bcf9d commit 62ccbf8Copy full SHA for 62ccbf8
1 file changed
src/msgqueue.c
@@ -101,7 +101,9 @@ static void* msgqueue_thread( void* arg )
101
}
102
else if (numreceived <= MAX_MSG_SIZE)
103
{
104
- message[numreceived] = 0; // ensure zero termination
+ message[numreceived] = 0;
105
+ message[sizeof(message) - 1] = 0; // ensure zero termination
106
+
107
PRINT_DEBUG("%s : New message received : %s", __func__, message);
108
109
if (!strncmp(message,"addstorage:", 11))
0 commit comments