From f6a86a578d52783b2662405e1c0f3b16093f3141 Mon Sep 17 00:00:00 2001 From: Petro Karashchenko Date: Sat, 22 Oct 2022 22:00:21 +0200 Subject: [PATCH] nshlib: fix possible out of bounds array access Signed-off-by: Petro Karashchenko --- nshlib/nsh_fsutils.c | 1 - 1 file changed, 1 deletion(-) diff --git a/nshlib/nsh_fsutils.c b/nshlib/nsh_fsutils.c index 2f88549c5..c9b50710c 100644 --- a/nshlib/nsh_fsutils.c +++ b/nshlib/nsh_fsutils.c @@ -513,7 +513,6 @@ FAR char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl, snprintf(vtbl->iobuffer, IOBUFFERSIZE, "%s/%s", dirpath, path); } - vtbl->iobuffer[PATH_MAX] = '\0'; return strdup(vtbl->iobuffer); } #endif