mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
libs/libc/ftok: fix sizeof(char *), after tempbuffer
Catched by coverity, we change full path from stack variable to ptr. Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
51bcec53c4
commit
38378149ed
1 changed files with 1 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ key_t ftok(FAR const char *pathname, int proj_id)
|
|||
|
||||
snprintf(fullpath, PATH_MAX, "%s/",
|
||||
CONFIG_LIBC_FTOK_VFS_PATH);
|
||||
strlcat(fullpath, pathname, sizeof(fullpath));
|
||||
strlcat(fullpath, pathname, PATH_MAX);
|
||||
if (stat(fullpath, &st) < 0 && get_errno() == ENOENT)
|
||||
{
|
||||
/* Directory not exist, let's create one for caller */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue