You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider adding a checking in common/fs/fat32.s2.c function fat32_init_context. The bpb.bytes_per_sector is directly used without checking if it is one of the four values (512, 1024, 2048, and 4096). If this value read from the hard drive is 0 which means the hard drive is corrupted, it will cause a divide-by-zero crash. A proper prompt should be given to the user that the hard drive is broken instead of using it directly.
Kind regards
The text was updated successfully, but these errors were encountered:
wjqsec
changed the title
Lack of checking of the fat32_bpb data
Lack of checking of the fat32_bpb.bytes_per_sector
May 17, 2024
Please consider adding a checking in common/fs/fat32.s2.c function fat32_init_context. The bpb.bytes_per_sector is directly used without checking if it is one of the four values (512, 1024, 2048, and 4096). If this value read from the hard drive is 0 which means the hard drive is corrupted, it will cause a divide-by-zero crash. A proper prompt should be given to the user that the hard drive is broken instead of using it directly.
Kind regards
The text was updated successfully, but these errors were encountered: