WineD3D: heap corruption patch
Markus Amsler
markus.amsler at oribi.org
Mon Nov 6 08:59:11 CST 2006
Oops, forgot to attach
-------------- next part --------------
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d0f44cf..45972c4 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1841,8 +1841,7 @@ static HRESULT WINAPI IWineD3DSurfaceImp
int height = This->glRect.bottom - This->glRect.top;
/* Stick to the alignment for the converted surface too, makes it easier to load the surface */
- outpitch = width * bpp;
- outpitch = (outpitch + 3) & ~3;
+ outpitch = pitch * 4;
mem = HeapAlloc(GetProcessHeap(), 0, outpitch * height);
if(!mem) {
More information about the wine-devel
mailing list