Merge "init: Fix memory corruption when sanitizing platform paths"
This commit is contained in:
commit
fed0f06bf0
1 changed files with 2 additions and 2 deletions
|
|
@ -329,9 +329,9 @@ void sanitize(char *s)
|
|||
if (!s)
|
||||
return;
|
||||
|
||||
for (; *s; s++) {
|
||||
while (*s) {
|
||||
s += strspn(s, accept);
|
||||
if (*s) *s = '_';
|
||||
if (*s) *s++ = '_';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue