From 4437be0e2610c8b537ba90c2ef35ddcf0bb5fc78 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 16 Mar 2015 13:27:16 -0500 Subject: Fix mount -a segfault without -O, reported by Janus Troelsen. --- lib/getmountlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/getmountlist.c') 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); -- cgit v1.2.3