From: Theodore Ts'o Date: Wed, 31 Aug 2022 21:01:21 +0000 (-0400) Subject: misc: fix test for unavailable mountpoint in tune2fs X-Git-Tag: v1.47.0~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75797f6467209db1b653686d09a6618dca728750;p=thirdparty%2Fe2fsprogs.git misc: fix test for unavailable mountpoint in tune2fs Addresses-Coverity-Bug: 1510127 Fixes: a83e199da0ca ("tune2fs: Add support for get/set UUID ioctls") Signed-off-by: Theodore Ts'o --- diff --git a/misc/tune2fs.c b/misc/tune2fs.c index c07ad52d8..9f0d43791 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -3588,7 +3588,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n" #ifdef __linux__ if ((mount_flags & EXT2_MF_MOUNTED) && - !(mount_flags & EXT2_MF_READONLY) && mntpt) { + !(mount_flags & EXT2_MF_READONLY) && mntpt[0]) { fd = open(mntpt, O_RDONLY); if (fd >= 0) fsuuid = malloc(sizeof(*fsuuid) + UUID_SIZE);