Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139416087
D33721.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
594 B
Referenced Files
None
Subscribers
None
D33721.diff
View Options
diff --git a/sys/geom/label/g_label_msdosfs.c b/sys/geom/label/g_label_msdosfs.c
--- a/sys/geom/label/g_label_msdosfs.c
+++ b/sys/geom/label/g_label_msdosfs.c
@@ -156,6 +156,12 @@
G_LABEL_DEBUG(2,
"MSDOSFS: FAT_FirstDataSector=0x%x, FAT_BytesPerSector=%d",
fat_FirstDataSector, fat_BytesPerSector);
+ if (fat_BytesPerSector == 0 ||
+ fat_BytesPerSector % pp->sectorsize != 0) {
+ G_LABEL_DEBUG(1, "MSDOSFS: %s: corrupted BPB",
+ pp->name);
+ goto error;
+ }
for (offset = fat_BytesPerSector * fat_FirstDataSector;;
offset += fat_BytesPerSector) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 8:19 PM (3 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26911561
Default Alt Text
D33721.diff (594 B)
Attached To
Mode
D33721: Improve msdosfs robustness
Attached
Detach File
Event Timeline
Log In to Comment