[ros-dev] [ros-diffs] [greatlrd] 37343: Bugfix : Do not link to LPDDRAWI_DIRECTDRAW_INT->lpLink when we do not have any LPDDRAWI_DIRECTDRAW_INT->lpLcl

gedmurphy gedmurphy at gmail.com
Thu Nov 13 21:59:05 CET 2008


Is it not time to start getting rid of IsBadWritePtr and friends?
I don't see a good reason for these in our own code, especially when we can just use SEH directly.


-----Original Message-----
From: ros-diffs-bounces at reactos.org [mailto:ros-diffs-bounces at reactos.org] On Behalf Of greatlrd at svn.reactos.org
Sent: 13 November 2008 19:52
To: ros-diffs at reactos.org
Subject: [ros-diffs] [greatlrd] 37343: Bugfix : Do not link to LPDDRAWI_DIRECTDRAW_INT->lpLink when we do not have any LPDDRAWI_DIRECTDRAW_INT->lpLcl

Author: greatlrd
Date: Thu Nov 13 13:52:20 2008
New Revision: 37343

URL: http://svn.reactos.org/svn/reactos?rev=37343&view=rev
Log:
Bugfix : Do not link to LPDDRAWI_DIRECTDRAW_INT->lpLink when we do not have any LPDDRAWI_DIRECTDRAW_INT->lpLcl

Modified:
    branches/reactx/reactos/dll/directx/ddraw/startup.c

Modified: branches/reactx/reactos/dll/directx/ddraw/startup.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw/startup.c?rev=37343&r1=37342&r2=37343&view=diff
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/startup.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/startup.c [iso-8859-1] Thu Nov 13 13:52:20 2008
@@ -33,8 +33,8 @@
 
     This = (LPDDRAWI_DIRECTDRAW_INT)*pIface;
 
-    /* fixme linking too second link when we shall not doing it */
-    if (IsBadReadPtr(This,sizeof(LPDIRECTDRAW)))
+    if ( (IsBadWritePtr(This,sizeof(LPDDRAWI_DIRECTDRAW_INT)) != 0) || 
+         (IsBadWritePtr(This->lpLcl,sizeof(LPDDRAWI_DIRECTDRAW_LCL)) != 0) )
     {
         /* We do not have a DirectDraw interface, we need alloc it*/
         LPDDRAWI_DIRECTDRAW_INT memThis;




More information about the Ros-dev mailing list