Author: jgardou
Date: Sun Sep 4 15:58:48 2011
New Revision: 53583
URL:
http://svn.reactos.org/svn/reactos?rev=53583&view=rev
Log:
[WIN32K]
- Avoid invalid memory write.
See issue #5969 for more details.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Sun Sep 4 15:58:48
2011
@@ -497,11 +497,14 @@
pti->pClientInfo = pci;
_SEH2_TRY
{
- ProbeForWrite( Teb,
- sizeof(TEB),
- sizeof(ULONG));
-
- Teb->Win32ThreadInfo = (PW32THREAD) pti;
+ if(Teb)
+ {
+ ProbeForWrite( Teb,
+ sizeof(TEB),
+ sizeof(ULONG));
+
+ Teb->Win32ThreadInfo = (PW32THREAD) pti;
+ }
pci->ppi = ppi;
pci->fsHooks = pti->fsHooks;