Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bef4060
)
blkid: Avoid division by zero error when probing an invalid FAT filesystem
author
Theodore Ts'o
<tytso@mit.edu>
Sun, 16 Dec 2007 03:21:31 +0000
(22:21 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Sun, 16 Dec 2007 03:21:31 +0000
(22:21 -0500)
Addresses-Sourceforge-Bug: #1831627
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/probe.c
patch
|
blob
|
history
diff --git
a/lib/blkid/probe.c
b/lib/blkid/probe.c
index
a188d82
..
4c72a56
100644
(file)
--- a/
lib/blkid/probe.c
+++ b/
lib/blkid/probe.c
@@
-284,6
+284,8
@@
static int probe_fat(struct blkid_probe *probe,
(sector_size-1)) / sector_size;
cluster_count = sect_count - (reserved + fat_size + dir_size);
+ if (ms->ms_cluster_size == 0)
+ return 1;
cluster_count /= ms->ms_cluster_size;
if (cluster_count > FAT32_MAX)