Description: bugfix read 1 byte out of bounds

Signed-off-by: caoyiting <caoyiting1@huawei.com>
This commit is contained in:
mlkgeek
2026-04-28 22:15:10 +08:00
parent a245393928
commit 5c1a467344
+1 -1
View File
@@ -55,7 +55,7 @@ static void GetDirName(char *dirBuf, unsigned int dirBufSize, const char *path)
}
const char *end = path + strlen(path);
while (*end != '/' && end >= path) {
while (end >= path && *end != '/') {
end--;
}
if (end >= path) {