another DPA_LoadStream Fix
Aric Stewart
aric at codeweavers.com
Fri Jan 18 09:34:56 CST 2002
We fail to set the streamData to 0 and if we are unable to read all that
we want from the stream then we proceed with uninitialize data.
changelog: Initialize streamData and check on failure to read desired
data from stream
-aric
-------------- next part --------------
Index: dlls/comctl32/comctl32undoc.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/comctl32undoc.c,v
retrieving revision 1.55
diff -u -u -r1.55 comctl32undoc.c
--- dlls/comctl32/comctl32undoc.c 2002/01/15 20:43:05 1.55
+++ dlls/comctl32/comctl32undoc.c 2002/01/18 13:37:27
@@ -93,6 +93,11 @@
position.s.LowPart = 0;
position.s.HighPart = 0;
+ /*
+ * Zero out our streamData
+ */
+ memset(&streamData,0,sizeof(STREAMDATA));
+
errCode = IStream_Seek (pStream, position, STREAM_SEEK_CUR, &newPosition);
if (errCode != S_OK)
return errCode;
@@ -104,7 +109,8 @@
FIXME ("dwSize=%lu dwData2=%lu dwItems=%lu\n",
streamData.dwSize, streamData.dwData2, streamData.dwItems);
- if (lParam < sizeof(STREAMDATA) ||
+ if ( ulRead < sizeof(STREAMDATA) ||
+ lParam < sizeof(STREAMDATA) ||
streamData.dwSize < sizeof(STREAMDATA) ||
streamData.dwData2 < 1) {
errCode = E_FAIL;
More information about the wine-patches
mailing list