mirror of
https://github.com/openharmony/hiviewdfx_blackbox_lite.git
synced 2026-07-01 05:38:02 -04:00
Description: bugfix read 1 byte out of bounds
Signed-off-by: caoyiting <caoyiting1@huawei.com>
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user