diff options
author | Rob Landley <rob@landley.net> | 2015-03-16 13:27:16 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-03-16 13:27:16 -0500 |
commit | 4437be0e2610c8b537ba90c2ef35ddcf0bb5fc78 (patch) | |
tree | aaa66ddc4775e3c63dd8211bcbdfb6ca376d6f57 /lib/getmountlist.c | |
parent | d111b9572125b70f821e89ac118c80bc4d9ad5b6 (diff) | |
download | toybox-4437be0e2610c8b537ba90c2ef35ddcf0bb5fc78.tar.gz |
Fix mount -a segfault without -O, reported by Janus Troelsen.
Diffstat (limited to 'lib/getmountlist.c')
-rw-r--r-- | lib/getmountlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getmountlist.c b/lib/getmountlist.c index c0e68750..30fb9a35 100644 --- a/lib/getmountlist.c +++ b/lib/getmountlist.c @@ -90,7 +90,7 @@ int comma_scanall(char *optlist, char *scanlist) { int i = 1; - for (;;) { + while (scanlist && *scanlist) { char *opt = comma_iterate(&scanlist, &i), *s = xstrndup(opt, i); i = comma_scan(optlist, s, 0); |