* commit 'ae3a8961f01e436a70cab569483b8ebcc1f56c0c': init: Fix memory corruption when sanitizing platform paths
This commit is contained in:
commit
2e826dc2b1
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…
Reference in a new issue