fix: 告警修复

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: Iaec45e835737c0ae7eea88408b2a1a4a79f1a40c
This commit is contained in:
arvinzzz
2022-03-22 17:22:03 +08:00
parent d28c8a0423
commit 38f8472ddb
10 changed files with 10 additions and 30 deletions

View File

@@ -130,7 +130,7 @@ STATIC CHAR *OsLsGetFullpath(const CHAR *path, struct dirent *pdirent)
goto exit_with_nomem;
}
ret = snprintf_s(fullpath, pathLen, pathLen, "%s/%s", path, pdirent->d_name);
ret = snprintf_s(fullpath, pathLen, pathLen - 1, "%s/%s", path, pdirent->d_name);
if (ret < 0) {
free(fullpath);
return NULL;