You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/05/22 15:34:28 UTC

[GitHub] [mynewt-mcumgr] utzig commented on a change in pull request #81: cmd/os_mgmt/port/zephyr: zephyr port os enhancement

utzig commented on a change in pull request #81:
URL: https://github.com/apache/mynewt-mcumgr/pull/81#discussion_r429317064



##########
File path: cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c
##########
@@ -63,12 +64,21 @@ os_mgmt_impl_task_info(int idx, struct os_mgmt_task_info *out_info)
     }
 
     *out_info = (struct os_mgmt_task_info){ 0 };
+
+#ifdef CONFIG_THREAD_NAME
+    strncpy(out_info->oti_name, thread->name, sizeof out_info->oti_name);

Review comment:
       What if Zephyr's `CONFIG_THREAD_MAX_NAME_LEN` is configured with a value larger than `OS_MGMT_TASK_NAME_LEN`, wouldn't this end up with a missing NULL terminator?




----------------------------------------------------------------
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.

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