Brown paper bag time: comma_scan() didn't work for anything but the last entry.
authorRob Landley <rob@landley.net>
Sun, 28 Sep 2014 18:11:20 +0000 (13:11 -0500)
committerRob Landley <rob@landley.net>
Sun, 28 Sep 2014 18:11:20 +0000 (13:11 -0500)
lib/getmountlist.c

index 9834722..5f4bc63 100644 (file)
@@ -76,7 +76,7 @@ int comma_scan(char *optlist, char *opt, int clean)
 
     if (!s) break;
     no = 2*(*s == 'n' && s[1] == 'o');
-    if (optlen == len+no && !strcmp(opt, s+no)) {
+    if (optlen == len-no && !strncmp(opt, s+no, optlen)) {
       got = !no;
       if (clean) memmove(s, optlist, strlen(optlist)+1);
     }