mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
sched_note: fix buffer size warning in coverity
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
This commit is contained in:
@@ -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, sizeof(note.nsa_name));
|
||||
|
||||
length = SIZEOF_NOTE_START(namelen + 1);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user