update fs/vfs/path_cache.c.

This commit is contained in:
冷钦街 2021-04-20 22:16:09 +08:00 committed by Gitee
parent 5605063950
commit d7798fd0ab
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ struct PathCache *PathCacheAlloc(struct Vnode *parent, struct Vnode *vnode, cons
return NULL;
}
ret = strncpy_s(nc->name, pathCacheSize, name, len);
ret = strncpy_s(nc->name, len + 1, name, len);
if (ret != LOS_OK) {
return NULL;
}