aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-03-16 13:27:16 -0500
committerRob Landley <rob@landley.net>2015-03-16 13:27:16 -0500
commit4437be0e2610c8b537ba90c2ef35ddcf0bb5fc78 (patch)
treeaaa66ddc4775e3c63dd8211bcbdfb6ca376d6f57 /lib
parentd111b9572125b70f821e89ac118c80bc4d9ad5b6 (diff)
downloadtoybox-4437be0e2610c8b537ba90c2ef35ddcf0bb5fc78.tar.gz
Fix mount -a segfault without -O, reported by Janus Troelsen.
Diffstat (limited to 'lib')
-rw-r--r--lib/getmountlist.c2
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);