Author: jimtabor
Date: Sat Aug 2 01:21:55 2008
New Revision: 35025
URL:
http://svn.reactos.org/svn/reactos?rev=35025&view=rev
Log:
- Dereference pointer to event and fix module check in hooks.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/event.c
trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] Sat Aug 2 01:21:55
2008
@@ -362,6 +362,8 @@
else
pEH->Proc = lpfnWinEventProc;
+ UserDereferenceObject(pEH);
+
Ret = Handle;
IntSetSrvEventMask( eventMin, eventMax);
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Sat Aug 2 01:21:55
2008
@@ -1143,10 +1143,9 @@
RETURN( NULL);
}
Hook->ModuleName.Length = ModuleName.Length;
- }
-
- if (Mod) /* make proc relative to the module base */
- Hook->Proc = (void *)((char *)HookProc - (char *)Mod);
+ /* make proc relative to the module base */
+ Hook->Proc = (void *)((char *)HookProc - (char *)Mod);
+ }
else
Hook->Proc = HookProc;