[ros-diffs] [fireball] 33601: - Ugly hack about corrupted KernelData pointer, which is being accessed. Hacks around bugs like bug 2954. See issue #2954 for more details.

fireball at svn.reactos.org fireball at svn.reactos.org
Mon May 19 22:27:49 CEST 2008


Author: fireball
Date: Mon May 19 15:27:48 2008
New Revision: 33601

URL: http://svn.reactos.org/svn/reactos?rev=33601&view=rev
Log:
- Ugly hack about corrupted KernelData pointer, which is being accessed. Hacks around bugs like bug 2954.
See issue #2954 for more details.

Modified:
    trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c

Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c?rev=33601&r1=33600&r2=33601&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Mon May 19 15:27:48 2008
@@ -720,6 +720,16 @@
             {
                 DPRINT1("Attempted to free global gdi handle 0x%x, caller needs to get ownership first!!!\n", hObj);
                 DPRINT1("Type = 0x%lx, KernelData = 0x%p, ProcessId = 0x%p\n", Entry->Type, Entry->KernelData, Entry->ProcessId);
+
+                /* HACK: Ugly and nasty */
+                if ((ULONG_PTR)Entry->KernelData < 0x1000)
+                {
+                    /* It's a memory-corruption bug (probably?),
+                       overcome it by just saying "yes, object destroyed" */
+                    DPRINT1("Bad kerneldata!!! Blame Win32k developers!\n");
+                    return TRUE;
+                }
+
             }
             else
             {



More information about the Ros-diffs mailing list