mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-27 13:14:26 -04:00
[misc] fix a crash when scanning a DD image with no UFD plugged in
* Also set the block size to 512 when scanning MBR and PBR * Closes #352
This commit is contained in:
parent
0fceb38433
commit
f6ab32c95d
3 changed files with 16 additions and 18 deletions
|
@ -527,7 +527,7 @@ BOOL AnalyzeMBR(HANDLE hPhysicalDrive, const char* TargetName)
|
|||
int i;
|
||||
|
||||
fake_fd._ptr = (char*)hPhysicalDrive;
|
||||
fake_fd._bufsiz = SelectedDrive.Geometry.BytesPerSector;
|
||||
fake_fd._bufsiz = 512;
|
||||
|
||||
if (!is_br(&fake_fd)) {
|
||||
uprintf("%s does not have an x86 %s\n", TargetName, mbr_name);
|
||||
|
@ -562,7 +562,7 @@ BOOL AnalyzePBR(HANDLE hLogicalVolume)
|
|||
int i;
|
||||
|
||||
fake_fd._ptr = (char*)hLogicalVolume;
|
||||
fake_fd._bufsiz = SelectedDrive.Geometry.BytesPerSector;
|
||||
fake_fd._bufsiz = 512;
|
||||
|
||||
if (!is_br(&fake_fd)) {
|
||||
uprintf("Volume does not have an x86 %s\n", pbr_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue