This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 5e59b0b38 nshlib: Fix static scanning errors
5e59b0b38 is described below
commit 5e59b0b384b02ea394e83c5d72c6404953f2195d
Author: wangmingrong <[email protected]>
AuthorDate: Fri Sep 1 15:01:35 2023 +0800
nshlib: Fix static scanning errors
Signed-off-by: wangmingrong <[email protected]>
---
nshlib/nsh_fsutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nshlib/nsh_fsutils.c b/nshlib/nsh_fsutils.c
index 3babedfd3..4dd8f4141 100644
--- a/nshlib/nsh_fsutils.c
+++ b/nshlib/nsh_fsutils.c
@@ -88,7 +88,7 @@ static int getpid_callback(FAR struct nsh_vtbl_s *vtbl,
return 0;
}
- len = read(fd, buffer, sizeof(buffer));
+ len = read(fd, buffer, sizeof(buffer) - 1);
close(fd);
if (len < 0)
{