From: LaMont Jones Date: Fri, 13 Feb 2009 18:59:53 +0000 (-0700) Subject: mount: segfault when creating mtab and cannot determine fsname X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bbe672b2601ee324d4a922e255d5396a2c07dc8;p=util-linux mount: segfault when creating mtab and cannot determine fsname Addresses-Debian-Bug: 488312 Signed-off-by: LaMont Jones --- diff --git a/mount/mount.c b/mount/mount.c index 75d50def..bc254bfd 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -567,7 +567,7 @@ create_mtab (void) { mnt.mnt_freq = mnt.mnt_passno = 0; free(extra_opts); - if (my_addmntent (mfp, &mnt) == 1) { + if (mnt.mnt_fsname && my_addmntent (mfp, &mnt) == 1) { int errsv = errno; die (EX_FILEIO, _("mount: error writing %s: %s"), _PATH_MOUNTED, strerror (errsv));