mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-05 17:14:26 -04:00
[ms-sys] fix for detecting windows MBRs with localised messages
* Windows MBRs contain localised strings which mean the bytes between the executable code and the disk signature / partition table can change depending on locale. This patch adds lengths to reflect the offsets which are the same for every locale, and only compares these lengths when detecting existing Windows MBRs.
This commit is contained in:
parent
c4b9ec4a62
commit
234b0a3fde
5 changed files with 19 additions and 13 deletions
|
@ -117,7 +117,7 @@ int is_2000_mbr(FILE *fp)
|
|||
#include "mbr_2000.h"
|
||||
|
||||
return
|
||||
contains_data(fp, 0x0, mbr_2000_0x0, sizeof(mbr_2000_0x0)) &&
|
||||
contains_data(fp, 0x0, mbr_2000_0x0, MBR_2000_LANG_INDEP_LEN) &&
|
||||
is_br(fp);
|
||||
} /* is_2000_mbr */
|
||||
|
||||
|
@ -126,7 +126,7 @@ int is_vista_mbr(FILE *fp)
|
|||
#include "mbr_vista.h"
|
||||
|
||||
return
|
||||
contains_data(fp, 0x0, mbr_vista_0x0, sizeof(mbr_vista_0x0)) &&
|
||||
contains_data(fp, 0x0, mbr_vista_0x0, MBR_VISTA_LANG_INDEP_LEN) &&
|
||||
is_br(fp);
|
||||
} /* is_vista_mbr */
|
||||
|
||||
|
@ -135,7 +135,7 @@ int is_win7_mbr(FILE *fp)
|
|||
#include "mbr_win7.h"
|
||||
|
||||
return
|
||||
contains_data(fp, 0x0, mbr_win7_0x0, sizeof(mbr_win7_0x0)) &&
|
||||
contains_data(fp, 0x0, mbr_win7_0x0, MBR_WIN7_LANG_INDEP_LEN) &&
|
||||
is_br(fp);
|
||||
} /* is_win7_mbr */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue