winedump: Fix MZ Header detection if there is no 'File address of new exe header'

André Hentschel nerv at dawncrow.de
Sun Jan 9 13:43:41 CST 2011


just got that case with an old 16-bit app
---
 tools/winedump/pe.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c
index 63001ed..e4c1ac1 100644
--- a/tools/winedump/pe.c
+++ b/tools/winedump/pe.c
@@ -1463,8 +1463,10 @@ enum FileSig get_kind_exec(void)
             if (*(const WORD *)pdw == IMAGE_VXD_SIGNATURE)      return SIG_LE;
             return SIG_DOS;
         }
+        else
+            if (*pw == IMAGE_DOS_SIGNATURE)                     return SIG_DOS;
     }
-    return 0;
+    return SIG_UNKNOWN;
 }
 
 void pe_dump(void)
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list