mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 21:29:49 +00:00
Fix mz check again
This commit is contained in:
parent
7832ca7f94
commit
33da5069f3
@ -1,4 +1,4 @@
|
||||
/* radare - LGPL - Copyright 2011-2015 - pancake */
|
||||
/* radare - LGPL - Copyright 2011-2017 - pancake */
|
||||
|
||||
#include <r_egg.h>
|
||||
#include <r_bin.h>
|
||||
@ -243,8 +243,8 @@ int main(int argc, char **argv) {
|
||||
{
|
||||
char *p = strchr (optarg, '=');
|
||||
if (p) {
|
||||
*p = 0;
|
||||
r_egg_option_set (egg, optarg, p + 1);
|
||||
*p++ = 0;
|
||||
r_egg_option_set (egg, optarg, p);
|
||||
} else {
|
||||
r_egg_option_set (egg, optarg, "true");
|
||||
}
|
||||
|
@ -28,7 +28,8 @@ static bool checkEntrypoint(const ut8 *buf, ut64 length) {
|
||||
// if (pa >= 0x20 && pa + 1 < length) {
|
||||
pa &= 0xffff;
|
||||
if (pa > 0x20 && pa + 1 < length) {
|
||||
if (length > 0x104 && !memcmp (buf + 0x100, "PE", 2)) {
|
||||
ut16 pe = r_read_ble16 (buf + 0x3c, false);
|
||||
if (pe < length && length > 0x104 && !memcmp (buf + pe, "PE", 2)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user