commit 19b07a60b699f905adc94d389eaa02c8e9b763ec
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Feb 20 00:55:14 2022 +0100

    mount: Fix deleting noauto/bind option
    
    After deleting an option, we have to let the loop continue from there
    instead of skipping another option.

commit 3e495aea3c353e34f2fdf3d0a3a142a54aa7bb00
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Feb 20 01:03:35 2022 +0100

    mount: Avoid appending empty options to empty mntopts
    
    argz_append does not actually support this.

Index: hurd-debian/utils/mount.c
===================================================================
--- hurd-debian.orig/utils/mount.c
+++ hurd-debian/utils/mount.c
@@ -255,20 +255,30 @@ do_mount (struct fs *fs, int remount)
 
       /* Remove the `noauto' and `bind' options, since they're for us not the
          filesystem.  */
-      for (o = mntopts; o; o = argz_next (mntopts, mntopts_len, o))
+      for (o = mntopts; o; )
         {
           if (strcmp (o, MNTOPT_NOAUTO) == 0)
-            argz_delete (&mntopts, &mntopts_len, o);
+	    {
+	      argz_delete (&mntopts, &mntopts_len, o);
+	      if (!mntopts || o >= mntopts + mntopts_len)
+		break;
+	      continue;
+	    }
           if (strcmp (o, "bind") == 0)
             {
               fs->mntent.mnt_type = strdup ("firmlink");
               if (!fs->mntent.mnt_type)
                 error (3, ENOMEM, "failed to allocate memory");
               argz_delete (&mntopts, &mntopts_len, o);
+	      if (!mntopts || o >= mntopts + mntopts_len)
+		break;
+	      continue;
             }
+	  o = argz_next (mntopts, mntopts_len, o);
         }
 
-      ARGZ (append (&mntopts, &mntopts_len, options, options_len));
+      if (options_len)
+        ARGZ (append (&mntopts, &mntopts_len, options, options_len));
     }
   else
     {
