This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 670963376ca062188fbe90f1cee313afc5524ad2 Author: xuxingliang <[email protected]> AuthorDate: Mon Apr 7 15:03:10 2025 +0800 coredump: fix coverity warning Fix warning of none NULL terminated string. CWE-170: Improper Null Termination Signed-off-by: xuxingliang <[email protected]> --- system/coredump/coredump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/coredump/coredump.c b/system/coredump/coredump.c index e35d7a5a8..5fa9f61e1 100644 --- a/system/coredump/coredump.c +++ b/system/coredump/coredump.c @@ -198,7 +198,7 @@ static int dumpfile_get_info(int fd, FAR struct coredump_info_s *info) } if (read(fd, name, nhdr.n_namesz) != nhdr.n_namesz || - strcmp(name, "NuttX") != 0) + strncmp(name, "NuttX", 6) != 0) { return -EINVAL; }
