Windows ignores values of e_cparhdr and e_crlc of the MZ header.
This commit is contained in:
parent
11e844db58
commit
6f66c1c75b
|
@ -200,10 +200,6 @@ enum binary_type MODULE_GetBinaryType( HANDLE hfile )
|
||||||
* structure encompasses the "Offset to extended header"
|
* structure encompasses the "Offset to extended header"
|
||||||
* field.
|
* field.
|
||||||
*/
|
*/
|
||||||
if ((header.mz.e_cparhdr << 4) < sizeof(IMAGE_DOS_HEADER))
|
|
||||||
return BINARY_DOS;
|
|
||||||
if (header.mz.e_crlc && (header.mz.e_lfarlc < sizeof(IMAGE_DOS_HEADER)))
|
|
||||||
return BINARY_DOS;
|
|
||||||
if (header.mz.e_lfanew < sizeof(IMAGE_DOS_HEADER))
|
if (header.mz.e_lfanew < sizeof(IMAGE_DOS_HEADER))
|
||||||
return BINARY_DOS;
|
return BINARY_DOS;
|
||||||
if (SetFilePointer( hfile, header.mz.e_lfanew, NULL, SEEK_SET ) == -1)
|
if (SetFilePointer( hfile, header.mz.e_lfanew, NULL, SEEK_SET ) == -1)
|
||||||
|
|
Loading…
Reference in New Issue