You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/09/14 14:54:42 UTC
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #10630: binfmt/binfmt_execmodule: Copy filename if CONFIG_BUILD_KERNEL and ar…
xiaoxiang781216 commented on code in PR #10630:
URL: https://github.com/apache/nuttx/pull/10630#discussion_r1326078403
##########
binfmt/binfmt_execmodule.c:
##########
@@ -166,6 +167,13 @@ int exec_module(FAR struct binary_s *binp,
}
#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
+ /* If there is no argument vector, the process name must be copied here */
+
+ if (argv == NULL)
+ {
+ filename = strncpy(name, filename, CONFIG_PATH_MAX);
Review Comment:
```suggestion
filename = strlcpy(name, filename, CONFIG_PATH_MAX);
```
--
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