commit | fed0f06bf04c6de90ae7b2f8ae9158ab2200498e | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Tue Sep 23 01:55:08 2014 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Sep 23 01:55:08 2014 +0000 |
tree | a01936d69e3a1ea1d1d04af8e2a3164ff4b77920 | |
parent | fbe58079b4ac12462f1ad7a23ff745919621b8dd [diff] | |
parent | 07f3fee164bd7ba14ce9b2dd3818006f07162845 [diff] |
Merge "init: Fix memory corruption when sanitizing platform paths"
diff --git a/init/util.c b/init/util.c index 0f69e1c..e1a3ee3 100644 --- a/init/util.c +++ b/init/util.c
@@ -329,9 +329,9 @@ if (!s) return; - for (; *s; s++) { + while (*s) { s += strspn(s, accept); - if (*s) *s = '_'; + if (*s) *s++ = '_'; } }