From 5e59b0b384b02ea394e83c5d72c6404953f2195d Mon Sep 17 00:00:00 2001 From: wangmingrong Date: Fri, 1 Sep 2023 15:01:35 +0800 Subject: [PATCH] nshlib: Fix static scanning errors Signed-off-by: wangmingrong --- 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) {