[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:
Pete Batard 2014-08-06 23:17:20 +01:00
parent 0fceb38433
commit f6ab32c95d
3 changed files with 16 additions and 18 deletions

View file

@ -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);