!168 【轻量级 PR】:update fs/vfs/path_cache.c.

Merge pull request !168 from 冷钦街/N/A
This commit is contained in:
openharmony_ci
2021-04-21 08:35:44 +08:00
committed by Gitee

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;
}