new Bug in OLE
mikem at codeweavers.com
Thu Feb 28 18:39:03 CST 2002
* fix uninitialized variable in StgOpenStorage reported by Mehmet Yasar
> Mike McCormack wrote:
> > Hi Mehmet,
> > I created the problematic change in question.
> > Without the change, when StgOpenStorage is called with an existing
> > zero length file as the filename, it fails because it suceeded in
> > opening the file but expects it to have valid content...
> > Unfortunately, the change was merged incorrectly from the big CW
> > patch. (the Fad structure is not initiaized)
> > Could you try this patch instead please?
> > Mike
> Thank you, the patch fixes the problem.
-------------- next part --------------
RCS file: /home/wine/wine/dlls/ole32/storage32.c,v
retrieving revision 1.30
diff -u -r1.30 storage32.c
--- dlls/ole32/storage32.c 2002/02/08 17:09:11 1.30
+++ dlls/ole32/storage32.c 2002/02/27 22:14:02
@@ -5504,7 +5504,7 @@
- WIN32_FILE_ATTRIBUTE_DATA Fad;
+ DWORD length;
TRACE("(%s, %p, %lx, %p, %ld, %p)\n",
debugstr_w(pwcsName), pstgPriority, grfMode,
@@ -5547,6 +5547,7 @@
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,
+ length = GetFileSize(hFile, NULL);
@@ -5599,7 +5600,7 @@
- !(Fad.nFileSizeHigh || Fad.nFileSizeLow) /* FALSE */ );
+ !length );
More information about the wine-patches