Christian Costa : d3dxof: Make sure This->buf. pdata is set to NULL before being used in case of error.
Alexandre Julliard
julliard at winehq.org
Mon Jan 23 13:00:57 CST 2012
Module: wine
Branch: master
Commit: 310c174eee2170395e2e3c21347d1525ae14c0bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=310c174eee2170395e2e3c21347d1525ae14c0bb
Author: Christian Costa <titan.costa at gmail.com>
Date: Sun Jan 22 17:44:01 2012 +0100
d3dxof: Make sure This->buf.pdata is set to NULL before being used in case of error.
---
dlls/d3dxof/d3dxof.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c
index 8678396..ab13f17 100644
--- a/dlls/d3dxof/d3dxof.c
+++ b/dlls/d3dxof/d3dxof.c
@@ -963,6 +963,9 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
This->buf.pxo_globals = This->xobjects;
This->buf.nb_pxo_globals = This->nb_xobjects;
This->buf.level = 0;
+ This->buf.pdata = NULL;
+ This->buf.capacity = 0;
+ This->buf.cur_pos_data = 0;
This->buf.pxo_tab = HeapAlloc(GetProcessHeap(), 0, sizeof(xobject)*MAX_SUBOBJECTS);
if (!This->buf.pxo_tab)
@@ -973,9 +976,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
}
This->buf.pxo = This->xobjects[This->nb_xobjects] = This->buf.pxo_tab;
- This->buf.pxo->pdata = This->buf.pdata = NULL;
- This->buf.capacity = 0;
- This->buf.cur_pos_data = 0;
+ This->buf.pxo->pdata = NULL;
This->buf.pxo->nb_subobjects = 1;
pstrings = HeapAlloc(GetProcessHeap(), 0, MAX_STRINGS_BUFFER);
More information about the wine-cvs
mailing list