From 75797f6467209db1b653686d09a6618dca728750 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 31 Aug 2022 17:01:21 -0400 Subject: [PATCH] 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 --- misc/tune2fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/tune2fs.c b/misc/tune2fs.c index c07ad52..9f0d437 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); -- 1.8.3.1