The attached patch hacks^H^H^H^H^Hfixes this problem. Obviously, this binary doesn't contain a valid PE header. OTOH it seems to be a valid Windows binary (I haven't checked it myself). Maybe somebody with a more deep insight into this can come up with a better fix.
Regards
Dominik
ChangeLog: Dominik Strasser: return Win32 binary istead of DOS binary if no valid header found
Index: loader/module.c =================================================================== RCS file: /home/wine/wine/loader/module.c,v retrieving revision 1.186 diff -u -3 -p -u -r1.186 module.c --- loader/module.c 21 Jul 2003 20:02:50 -0000 1.186 +++ loader/module.c 16 Aug 2003 08:30:07 -0000 @@ -201,7 +201,7 @@ enum binary_type MODULE_GetBinaryType( H * field. */ if ((header.mz.e_cparhdr << 4) < sizeof(IMAGE_DOS_HEADER)) - return BINARY_DOS; + return BINARY_PE_EXE; 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))
"Dominik Strasser" Dominik.Strasser@t-online.de wrote:
The attached patch hacks^H^H^H^H^Hfixes this problem. Obviously, this binary doesn't contain a valid PE header. OTOH it seems to be a valid Windows binary (I haven't checked it myself). Maybe somebody with a more deep insight into this can come up with a better fix.
if ((header.mz.e_cparhdr << 4) < sizeof(IMAGE_DOS_HEADER))
return BINARY_DOS;
return BINARY_PE_EXE;
Of course the patch is wrong. How it can be that an .exe has no a valid PE header but it seems to be a valid PE executable? You have to investigate what that file is in reality.
Dmitry Timoshkov wrote:
"Dominik Strasser" Dominik.Strasser@t-online.de wrote:
The attached patch hacks^H^H^H^H^Hfixes this problem. Obviously, this binary doesn't contain a valid PE header. OTOH it seems to be a valid Windows binary (I haven't checked it myself). Maybe somebody with a more deep insight into this can come up with a better fix.
if ((header.mz.e_cparhdr << 4) < sizeof(IMAGE_DOS_HEADER))
return BINARY_DOS;
return BINARY_PE_EXE;
Of course the patch is wrong. How it can be that an .exe has no a valid PE header but it seems to be a valid PE executable? You have to investigate what that file is in reality.
I know that this patch stinks. But the .EXE is valid. It works under Win98. PE Explorer shows the information.
Dominik
"Dominik Strasser" Dominik.Strasser@t-online.de wrote:
I know that this patch stinks. But the .EXE is valid. It works under Win98. PE Explorer shows the information.
You have to provide more details, at least send a hex dump of the headers.
Dmitry Timoshkov wrote:
"Dominik Strasser" Dominik.Strasser@t-online.de wrote:
I know that this patch stinks. But the .EXE is valid. It works under Win98. PE Explorer shows the information.
You have to provide more details, at least send a hex dump of the headers.
Here is the header:
0000000: 4d5a 0000 0200 0000 0200 1e00 1e00 0000 MZ.............. 0000010: 0002 0000 0000 0000 0000 0000 c5a7 2ee1 ................ 0000020: 0e1f ba0e 00b4 09cd 21b8 ff4c cd21 5769 ........!..L.!Wi 0000030: 6e33 3220 7265 7164 2e0d 0a24 e800 0000 n32 reqd...$.... 0000040: 6c70 08d0 b7ce c295 397e 647c 68fd ea43 lp......9~d|h..C 0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000060: 69e3 873e a851 3443 2bf8 82c0 4e63 2c17 i..>.Q4C+...Nc,. 0000070: 6361 7765 6273 6974 6500 0000 0000 0000 cawebsite....... 0000080: 5553 4420 2020 0000 0019 9910 5457 4556 USD ......TWEV 0000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000e0: 0000 0000 0000 0000 5045 0000 4c01 0400 ........PE..L... 00000f0: 34b7 743e 0000 0000 0000 0000 e000 0f01 4.t>............ 0000100: 0b01 0600 005e 0000 005e 0200 0000 0000 .....^...^...... 0000110: 4640 0000 0010 0000 0070 0000 0000 4000 F@.......p....@. 0000120: 0010 0000 0002 0000 0400 0000 0000 0000 ................ 0000130: 0400 0000 0000 0000 0000 0300 0004 0000 ................ 0000140: 0000 0000 0200 0000 0000 1000 0010 0000 ................ 0000150: 0000 1000 0010 0000 0000 0000 1000 0000 ................ 0000160: 0000 0000 0000 0000 d473 0000 b400 0000 .........s...... 0000170: 00d0 0200 0030 0000 0000 0000 0000 0000 .....0.......... 0000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00001c0: 0070 0000 9402 0000 0000 0000 0000 0000 .p.............. 00001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
Dominik