xiaoxiang781216 commented on a change in pull request #5519:
URL: https://github.com/apache/incubator-nuttx/pull/5519#discussion_r810102665



##########
File path: sched/wqueue/kwork_thread.c
##########
@@ -205,11 +205,11 @@ static int work_thread_create(FAR const char *name, int 
priority,
                               FAR struct kwork_wqueue_s *wqueue)
 {
   FAR char *argv[2];
-  char args[16];
+  char args[32];
   int wndx;
   int pid;
 
-  snprintf(args, 16, "0x%" PRIxPTR, (uintptr_t)wqueue);
+  snprintf(args, 32, "0x%" PRIxPTR, (uintptr_t)wqueue);

Review comment:
       Done.

##########
File path: libs/libc/string/lib_strdup.c
##########
@@ -36,13 +36,11 @@
 FAR char *strdup(FAR const char *s)
 {
   FAR char *news = NULL;
-  if (s)
+
+  news = (FAR char *)lib_malloc(strlen(s) + 1);

Review comment:
       Done.

##########
File path: libs/libc/time/lib_asctimer.c
##########
@@ -70,10 +70,13 @@ static const char * const g_mon_name[12] =
 
 FAR char *asctime_r(FAR const struct tm *tp, FAR char *buf)
 {
-  snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
+  char tmp[128];
+
+  snprintf(tmp, 128, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",

Review comment:
       Done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to