changeset 1742:ba22c0d4273f draft

Fix mount -a segfault without -O, reported by Janus Troelsen.
author Rob Landley <rob@landley.net>
date Mon, 16 Mar 2015 13:27:16 -0500
parents fece3d1f2924
children da1296acc73e
files lib/getmountlist.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/getmountlist.c	Mon Mar 16 13:25:29 2015 -0500
+++ b/lib/getmountlist.c	Mon Mar 16 13:27:16 2015 -0500
@@ -90,7 +90,7 @@
 {
   int i = 1;
 
-  for (;;) {
+  while (scanlist && *scanlist) {
     char *opt = comma_iterate(&scanlist, &i), *s = xstrndup(opt, i);
 
     i = comma_scan(optlist, s, 0);