Revert "nshlib: fix possible out of bounds array access"

This reverts commit f6a86a578d.
This commit is contained in:
Petro Karashchenko 2022-10-23 09:28:49 +03:00
parent a7567ce7b6
commit fe4b44e3ff

View File

@ -513,6 +513,7 @@ 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