[parted-devel] [PATCH 3/4] libparted: Fix dvh disklabel unhandled exception
Brian C. Lane
bcl at redhat.com
Thu Jan 9 01:01:48 GMT 2025
When an exception is using PED_EXCEPTION_IGNORE_CANCEL it should check
for !PED_EXCEPTION_IGNORE so that an unhandled exception is treated the
same as cancel. Otherwise it could lead to using the disklabel with
incorrect values.
---
libparted/labels/dvh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libparted/labels/dvh.c b/libparted/labels/dvh.c
index 0f9124d..7d7dae3 100644
--- a/libparted/labels/dvh.c
+++ b/libparted/labels/dvh.c
@@ -308,7 +308,7 @@ dvh_read (PedDisk* disk)
PED_EXCEPTION_IGNORE_CANCEL,
_("Checksum is wrong, indicating the partition "
"table is corrupt."))
- == PED_EXCEPTION_CANCEL)
+ != PED_EXCEPTION_IGNORE)
return 0;
}
--
2.47.1
More information about the parted-devel
mailing list