ccollins476ad commented on a change in pull request #1439: test/runtest: 
Null-terminate segments of log entry
URL: https://github.com/apache/mynewt-core/pull/1439#discussion_r222327603
 
 

 ##########
 File path: test/runtest/src/runtest.c
 ##########
 @@ -165,8 +165,10 @@ runtest_log_result(const char *msg, bool passed)
     int m_len;
     int len;
 
-    /* str length of {"k":"","n":"","s":"","m":"","r":1}<token> */
-    len = 35 + strlen(runtest_token);
+    /* str length of {"k":"","n":"","s":"","m":"","r":1}<token> plus three
+     * null-terminators.
+     */
+    len = sizeof 38 + strlen(runtest_token);
 
 Review comment:
   Jeeze... no that is not correct :).  That is a leftover from an earlier fix 
that I didn't fully remove.  I have fixed it (removed `sizeof`).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to