[ros-diffs] [fireball] 48735: [NTOS] - Fix a strange bug where we were only setting SharedUserData->TestRetInstruction conditionally only if lookup failed - it should be set on success. Also, bail out if the l...

fireball at svn.reactos.org fireball at svn.reactos.org
Fri Sep 10 21:01:59 UTC 2010


Author: fireball
Date: Fri Sep 10 21:01:59 2010
New Revision: 48735

URL: http://svn.reactos.org/svn/reactos?rev=48735&view=rev
Log:
[NTOS]
- Fix a strange bug where we were only setting SharedUserData->TestRetInstruction conditionally only if lookup failed - it should be set on success. Also, bail out if the lookups failed.

Modified:
    trunk/reactos/ntoskrnl/ps/psmgr.c

Modified: trunk/reactos/ntoskrnl/ps/psmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=48735&r1=48734&r2=48735&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ps/psmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/psmgr.c [iso-8859-1] Fri Sep 10 21:01:59 2010
@@ -200,6 +200,7 @@
         Status = PspLookupSystemDllEntryPoint("KiFastSystemCallRet",
                                               (PVOID)&SharedUserData->
                                               SystemCallReturn);
+        if (!NT_SUCCESS(Status)) return Status;
     }
     else
     {
@@ -207,10 +208,11 @@
         Status = PspLookupSystemDllEntryPoint("KiIntSystemCall",
                                               (PVOID)&SharedUserData->
                                               SystemCall);
+        if (!NT_SUCCESS(Status)) return Status;
     }
 
     /* Set the test instruction */
-    if (!NT_SUCCESS(Status)) SharedUserData->TestRetInstruction = 0xC3;
+    SharedUserData->TestRetInstruction = 0xC3;
 
     /* Return the status */
     return Status;




More information about the Ros-diffs mailing list