You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/09/08 10:49:37 UTC
[nuttx-apps] branch master updated: nshlib: Fix static scanning errors
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 <wa...@xiaomi.com>
AuthorDate: Fri Sep 1 15:01:35 2023 +0800
nshlib: Fix static scanning errors
Signed-off-by: wangmingrong <wa...@xiaomi.com>
---
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)
{