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(a)reactos.org [mailto:ros-diffs-bounces@reactos.org] On Behalf Of
greatlrd(a)svn.reactos.org
Sent: 13 November 2008 19:52
To: ros-diffs(a)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/ddra…
==============================================================================
--- 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;