[ros-diffs] [jmorlan] 35045: NtGdiGetRegionData: Use correct address of region header (&obj->rdh, not obj). Also, for the contents, just use 'rgndata->Buffer' as the destination address instead of doing funky pointer arithmetic.

jmorlan at svn.reactos.org jmorlan at svn.reactos.org
Sat Aug 2 22:08:00 CEST 2008


Author: jmorlan
Date: Sat Aug  2 15:07:59 2008
New Revision: 35045

URL: http://svn.reactos.org/svn/reactos?rev=35045&view=rev
Log:
NtGdiGetRegionData: Use correct address of region header (&obj->rdh, not obj). Also, for the contents, just use 'rgndata->Buffer' as the destination address instead of doing funky pointer arithmetic.

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

Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/region.c?rev=35045&r1=35044&r2=35045&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Sat Aug  2 15:07:59 2008
@@ -3174,12 +3174,8 @@
     _SEH_TRY
     {
         ProbeForWrite(rgndata, count, 1);
-        RtlCopyMemory(rgndata,
-                      obj,
-                      sizeof(RGNDATAHEADER));
-        RtlCopyMemory((PVOID)((ULONG_PTR)rgndata + (ULONG_PTR)sizeof(RGNDATAHEADER)),
-                      obj->Buffer,
-                      size);
+        RtlCopyMemory(rgndata, &obj->rdh, sizeof(RGNDATAHEADER));
+        RtlCopyMemory(rgndata->Buffer, obj->Buffer, size);
     }
     _SEH_HANDLE
     {



More information about the Ros-diffs mailing list