Author: weiden
Date: Fri Mar 23 18:34:34 2007
New Revision: 26158
URL:
http://svn.reactos.org/svn/reactos?rev=26158&view=rev
Log:
Fix bugs in GetBinaryType reported by songlei(a)qihoo.net
Modified:
trunk/reactos/dll/win32/kernel32/file/bintype.c
Modified: trunk/reactos/dll/win32/kernel32/file/bintype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/bi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/bintype.c (original)
+++ trunk/reactos/dll/win32/kernel32/file/bintype.c Fri Mar 23 18:34:34 2007
@@ -157,7 +157,7 @@
{
IMAGE_FILE_HEADER FileHeader;
if(!ReadFile(hFile, &FileHeader, sizeof(IMAGE_FILE_HEADER), &Read, NULL)
||
- (Read == sizeof(IMAGE_FILE_HEADER)))
+ (Read != sizeof(IMAGE_FILE_HEADER)))
{
return BINARY_DOS;
}
@@ -179,7 +179,7 @@
IMAGE_OS2_HEADER ne;
if((SetFilePointer(hFile, Header.mz.e_lfanew, NULL, FILE_BEGIN) == 1) ||
!ReadFile(hFile, &ne, sizeof(IMAGE_OS2_HEADER), &Read, NULL) ||
- (Read == sizeof(IMAGE_OS2_HEADER)))
+ (Read != sizeof(IMAGE_OS2_HEADER)))
{
/* Couldn't read header, so abort. */
return BINARY_DOS;