forked from len0rd/rockbox
[BugFix, Asan] skin_tokens.c get_dir path name underrun
preventing multiple slashes reads prior to the buffer by 1 byte when only a single slash exists Change-Id: I1ce1dc8d754bf1c8798dc49f396c9142e4a6e49c
This commit is contained in:
parent
556b466f05
commit
9d3b012ac0
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ char* get_dir(char* buf, int buf_size, const char* path, int level)
|
|||
break;
|
||||
|
||||
last_sep = sep - 1;
|
||||
if (*last_sep != '/') /* ignore multiple separators */
|
||||
if (last_sep < path || *last_sep != '/') /* ignore multiple separators */
|
||||
level--;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue