You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/01 16:56:02 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5953: fix coverify warning

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



##########
File path: sched/sched/sched_note.c
##########
@@ -494,7 +494,7 @@ void sched_note_start(FAR struct tcb_s *tcb)
   namelen = strlen(tcb->name);
 
   DEBUGASSERT(namelen <= CONFIG_TASK_NAME_SIZE);
-  strncpy(note.nsa_name, tcb->name, CONFIG_TASK_NAME_SIZE + 1);
+  strlcpy(note.nsa_name, tcb->name, CONFIG_TASK_NAME_SIZE + 1);

Review comment:
       no, since note.nsa_name contain `CONFIG_TASK_NAME_SIZE + 1`'s char,




-- 
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-unsubscribe@nuttx.apache.org

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