avoid msvfw32 crash
luis lenders
lgvlenders at yahoo.co.uk
Mon May 23 05:57:41 CDT 2005
Hi, i have a little app that runs fine with native
msvfw32.Using builtin makes it crash at line 245 of
drawdib.c. Following patch fixes this
Index: wine/dlls/msvideo/drawdib.c
===================================================================
RCS file: /home/wine/wine/dlls/msvideo/drawdib.c,v
retrieving revision 1.24
diff -u -p -r1.24 drawdib.c
--- wine/dlls/msvideo/drawdib.c 17 Jan 2005 15:33:43
-0000 1.24
+++ wine/dlls/msvideo/drawdib.c 23 May 2005 10:49:21
-0000
@@ -181,7 +181,7 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB
hdd,
TRACE("(%p,%p,%d,%d,%p,%d,%d,0x%08lx)\n",
hdd, hdc, dxDst, dyDst, lpbi, dxSrc, dySrc,
(DWORD)wFlags);
- TRACE("lpbi:
%ld,%ld/%ld,%d,%d,%ld,%ld,%ld,%ld,%ld,%ld\n",
+ TRACE("lpbi:
%ld,%ld,%ld,%d,%d,%ld,%ld,%ld,%ld,%ld,%ld\n",
lpbi->biSize, lpbi->biWidth,
lpbi->biHeight, lpbi->biPlanes,
lpbi->biBitCount, lpbi->biCompression,
lpbi->biSizeImage,
lpbi->biXPelsPerMeter,
lpbi->biYPelsPerMeter, lpbi->biClrUsed,
@@ -242,7 +242,10 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB
hdd,
TRACE("Not compressed!\n");
dwSize = lpbi->biSize +
num_colours(lpbi)*sizeof(RGBQUAD);
whdd->lpbiOut = HeapAlloc(GetProcessHeap(),
0, dwSize);
- memcpy(whdd->lpbiOut, lpbi, dwSize);
+ if (whdd->lpbiOut)
+ memcpy(whdd->lpbiOut, lpbi, dwSize);
+ else
+ ret=FALSE;
}
if (ret)
___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online? http://uk.messenger.yahoo.com
More information about the wine-patches
mailing list