commit | ae3a8961f01e436a70cab569483b8ebcc1f56c0c | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Tue Sep 23 02:05:55 2014 +0000 |
committer | Android Git Automerger <android-git-automerger@android.com> | Tue Sep 23 02:05:55 2014 +0000 |
tree | c7f5bb4e944176c1f7bd429e0141356af46bebb7 | |
parent | ffbb05e6744e8de1bfc40fde17aae401217ea003 [diff] | |
parent | fed0f06bf04c6de90ae7b2f8ae9158ab2200498e [diff] |
am fed0f06b: Merge "init: Fix memory corruption when sanitizing platform paths" * commit 'fed0f06bf04c6de90ae7b2f8ae9158ab2200498e': 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++ = '_'; } }