Author: tkreuzer
Date: Thu Sep 25 14:26:09 2008
New Revision: 36519
URL:
http://svn.reactos.org/svn/reactos?rev=36519&view=rev
Log:
Allocate size of structure, not size of pointer to the structure. Fixes Coverity errors
767, 768, 769, 770
Modified:
trunk/reactos/dll/directx/ddraw/Clipper/clipper_main.c
trunk/reactos/dll/directx/ddraw/Surface/surface_main.c
Modified: trunk/reactos/dll/directx/ddraw/Clipper/clipper_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Clipper/…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Clipper/clipper_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/ddraw/Clipper/clipper_main.c [iso-8859-1] Thu Sep 25
14:26:09 2008
@@ -38,14 +38,14 @@
This->lpVtbl = (LPVOID)&DirectDrawClipper_Vtable;
This->dwIntRefCnt = 1;
- DxHeapMemAlloc(This->lpLcl, sizeof(LPDDRAWI_DDRAWCLIPPER_LCL));
+ DxHeapMemAlloc(This->lpLcl, sizeof(DDRAWI_DDRAWCLIPPER_LCL));
//This->lpLcl->lpClipMore
This->lpLcl->lpDD_int = DDraw;
This->lpLcl->lpGbl->dwRefCnt = 1;
This->lpLcl->pAddrefedThisOwner = (IUnknown*)DDraw;
// FIXME: Implement Linking and share global object
- DxHeapMemAlloc(This->lpLcl->lpGbl, sizeof(LPDDRAWI_DDRAWCLIPPER_GBL));
+ DxHeapMemAlloc(This->lpLcl->lpGbl, sizeof(DDRAWI_DDRAWCLIPPER_GBL));
This->lpLcl->lpGbl->dwProcessId = GetCurrentProcessId();
return DD_OK;
Modified: trunk/reactos/dll/directx/ddraw/Surface/surface_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1] Thu Sep 25
14:26:09 2008
@@ -24,7 +24,7 @@
internal_directdrawsurface_int_alloc(LPDDRAWI_DDRAWSURFACE_INT This)
{
LPDDRAWI_DDRAWSURFACE_INT newThis;
- DxHeapMemAlloc(newThis, sizeof(LPDDRAWI_DDRAWSURFACE_INT));
+ DxHeapMemAlloc(newThis, sizeof(DDRAWI_DDRAWSURFACE_INT));
if (newThis)
{
newThis->lpLcl = This->lpLcl;