summaryrefslogtreecommitdiff
path: root/nuttx/sched/init/os_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/init/os_start.c')
-rw-r--r--nuttx/sched/init/os_start.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nuttx/sched/init/os_start.c b/nuttx/sched/init/os_start.c
index 561e79b9b..fcb305180 100644
--- a/nuttx/sched/init/os_start.c
+++ b/nuttx/sched/init/os_start.c
@@ -307,7 +307,8 @@ void os_start(void)
/* Set the IDLE task name */
#if CONFIG_TASK_NAME_SIZE > 0
- strncpy(g_idletcb.cmn.name, g_idlename, CONFIG_TASK_NAME_SIZE-1);
+ strncpy(g_idletcb.cmn.name, g_idlename, CONFIG_TASK_NAME_SIZE);
+ g_idletcb.cmn.name[CONFIG_TASK_NAME_SIZE] = '\0';
#endif /* CONFIG_TASK_NAME_SIZE */
/* Configure the task name in the argument list. The IDLE task does