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