[ros-diffs] [jimtabor] 28219: Don't write to user space with after an error.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Tue Aug 7 21:29:48 CEST 2007


Author: jimtabor
Date: Tue Aug  7 23:29:48 2007
New Revision: 28219

URL: http://svn.reactos.org/svn/reactos?rev=28219&view=rev
Log:
Don't write to user space with after an error.

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

Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dc.c?rev=28219&r1=28218&r2=28219&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Tue Aug  7 23:29:48 2007
@@ -1210,18 +1210,22 @@
       Ret = FALSE;
       break;
   }
-  _SEH_TRY
-  {
-    ProbeForWrite(Point,
-                  sizeof(POINT),
-                  1);
-    *Point = SafePoint;
-  }
-  _SEH_HANDLE
-  {
-    Status = _SEH_GetExceptionCode();
-  }
-  _SEH_END;
+
+  if (!Ret)
+  {
+    _SEH_TRY
+    {
+      ProbeForWrite(Point,
+                    sizeof(POINT),
+                    1);
+      *Point = SafePoint;
+    }
+    _SEH_HANDLE
+    {
+      Status = _SEH_GetExceptionCode();
+    }
+    _SEH_END;
+  }
 
   if(!NT_SUCCESS(Status))
   {




More information about the Ros-diffs mailing list