From 3e495aea3c353e34f2fdf3d0a3a142a54aa7bb00 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 20 Feb 2022 01:03:35 +0100 Subject: mount: Avoid appending empty options to empty mntopts argz_append does not actually support this. --- utils/mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'utils/mount.c') diff --git a/utils/mount.c b/utils/mount.c index 68fd6493..30e9bef3 100644 --- a/utils/mount.c +++ b/utils/mount.c @@ -277,7 +277,8 @@ do_mount (struct fs *fs, int remount) 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 { -- cgit v1.2.3