27 lines
926 B
Diff
27 lines
926 B
Diff
|
|
From 48229f8e7f19c1b61a089fc9ede18d417a895454 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Karel Zak <kzak@redhat.com>
|
||
|
|
Date: Mon, 24 Oct 2022 10:54:24 +0200
|
||
|
|
Subject: [PATCH] libblkid: (exfat) fix divide by zero [coverity scan]
|
||
|
|
|
||
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||
|
|
---
|
||
|
|
libblkid/src/superblocks/exfat.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c
|
||
|
|
index 9d1309425..398619477 100644
|
||
|
|
--- a/libblkid/src/superblocks/exfat.c
|
||
|
|
+++ b/libblkid/src/superblocks/exfat.c
|
||
|
|
@@ -101,7 +101,7 @@ static struct exfat_entry_label *find_label(blkid_probe pr,
|
||
|
|
return (struct exfat_entry_label *) entry;
|
||
|
|
|
||
|
|
offset += EXFAT_ENTRY_SIZE;
|
||
|
|
- if (offset % CLUSTER_SIZE(sb) == 0) {
|
||
|
|
+ if (CLUSTER_SIZE(sb) && (offset % CLUSTER_SIZE(sb)) == 0) {
|
||
|
|
cluster = next_cluster(pr, sb, cluster);
|
||
|
|
if (cluster < EXFAT_FIRST_DATA_CLUSTER)
|
||
|
|
return NULL;
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|