summaryrefslogtreecommitdiff
path: root/nuttx/sched/pthread/pthread_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/pthread/pthread_create.c')
-rw-r--r--nuttx/sched/pthread/pthread_create.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/nuttx/sched/pthread/pthread_create.c b/nuttx/sched/pthread/pthread_create.c
index 70c00a447..8cfab5908 100644
--- a/nuttx/sched/pthread/pthread_create.c
+++ b/nuttx/sched/pthread/pthread_create.c
@@ -115,6 +115,7 @@ static inline void pthread_argsetup(FAR struct pthread_tcb_s *tcb, pthread_addr_
/* Copy the pthread name into the TCB */
strncpy(tcb->cmn.name, g_pthreadname, CONFIG_TASK_NAME_SIZE);
+ tcb->cmn.name[CONFIG_TASK_NAME_SIZE] = '\0';
#endif /* CONFIG_TASK_NAME_SIZE */
/* For pthreads, args are strictly pass-by-value; that actual