Permalink
Browse files

Fix 32-bit process identifying 64-bit process.

  • Loading branch information...
1 parent b73334a commit 4add6313e9b795089a9e830920d7491857e70d67 @adoxa committed Feb 5, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 proctype.c
View
@@ -75,6 +75,15 @@ int ProcessType( LPPROCESS_INFORMATION pinfo, BOOL* gui )
}
}
}
+#ifdef _WIN32
+ // If a 32-bit process manages to load a 64-bit one, we may miss the base
+ // address. If the pointer overflows, assume 64-bit and abort.
+ if (ptr > ptr + minfo.RegionSize)
+ {
+ DEBUGSTR( 1, L" Ignoring apparent 64-bit process." );
+ return 0;
+ }
+#endif
}
DEBUGSTR( 1, L" Ignoring non-Windows process" );

0 comments on commit 4add631

Please sign in to comment.