nshlib: fix possible out of bounds array access
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
e431abe2ed
commit
f6a86a578d
@ -513,7 +513,6 @@ FAR char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
|
|||||||
snprintf(vtbl->iobuffer, IOBUFFERSIZE, "%s/%s", dirpath, path);
|
snprintf(vtbl->iobuffer, IOBUFFERSIZE, "%s/%s", dirpath, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
vtbl->iobuffer[PATH_MAX] = '\0';
|
|
||||||
return strdup(vtbl->iobuffer);
|
return strdup(vtbl->iobuffer);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user