Commit 97b8c570 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Initialize streamData and check on failure to read desired data from

stream.
parent ca5b2013
...@@ -93,6 +93,11 @@ DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc, IStream *pStream, LPARAM lPar ...@@ -93,6 +93,11 @@ DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc, IStream *pStream, LPARAM lPar
position.s.LowPart = 0; position.s.LowPart = 0;
position.s.HighPart = 0; position.s.HighPart = 0;
/*
* Zero out our streamData
*/
memset(&streamData,0,sizeof(STREAMDATA));
errCode = IStream_Seek (pStream, position, STREAM_SEEK_CUR, &newPosition); errCode = IStream_Seek (pStream, position, STREAM_SEEK_CUR, &newPosition);
if (errCode != S_OK) if (errCode != S_OK)
return errCode; return errCode;
...@@ -104,7 +109,8 @@ DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc, IStream *pStream, LPARAM lPar ...@@ -104,7 +109,8 @@ DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc, IStream *pStream, LPARAM lPar
FIXME ("dwSize=%lu dwData2=%lu dwItems=%lu\n", FIXME ("dwSize=%lu dwData2=%lu dwItems=%lu\n",
streamData.dwSize, streamData.dwData2, streamData.dwItems); streamData.dwSize, streamData.dwData2, streamData.dwItems);
if (lParam < sizeof(STREAMDATA) || if ( ulRead < sizeof(STREAMDATA) ||
lParam < sizeof(STREAMDATA) ||
streamData.dwSize < sizeof(STREAMDATA) || streamData.dwSize < sizeof(STREAMDATA) ||
streamData.dwData2 < 1) { streamData.dwData2 < 1) {
errCode = E_FAIL; errCode = E_FAIL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment