PATCH: heap corruption in IWineD3DImpl_FillGLCaps
Marcus Meissner
marcus at jet.franken.de
Sat Oct 1 12:29:17 CDT 2005
Hi,
This patch fixes a heap corruption in IWineD3DImpl_FillGLCaps.
(http://bugs.winehq.org/show_bug.cgi?id=2178)
Ciao, Marcus
Changelog:
Use correct minLookup[] array entry.
Index: directx.c
===================================================================
RCS file: /home/wine/wine/dlls/wined3d/directx.c,v
retrieving revision 1.55
diff -u -p -r1.55 directx.c
--- dlls/wined3d/directx.c 21 Sep 2005 10:55:03 -0000 1.55
+++ dlls/wined3d/directx.c 1 Oct 2005 17:27:16 -0000
@@ -588,7 +588,7 @@ static BOOL IWineD3DImpl_FillGLCaps(Wine
for (i = 0; i < MAX_LOOKUPS; i++) {
- stateLookup[i] = HeapAlloc(GetProcessHeap(), 0, sizeof(*stateLookup[i]) * (1 + maxLookup[i] - minLookup[MAX_LOOKUPS]) );
+ stateLookup[i] = HeapAlloc(GetProcessHeap(), 0, sizeof(*stateLookup[i]) * (1 + maxLookup[i] - minLookup[i]) );
}
stateLookup[WINELOOKUP_WARPPARAM][D3DTADDRESS_WRAP - minLookup[WINELOOKUP_WARPPARAM]] = GL_REPEAT;
@@ -623,7 +623,6 @@ static BOOL IWineD3DImpl_FillGLCaps(Wine
minMipLookup[D3DTEXF_ANISOTROPIC][D3DTEXF_POINT] = gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC] ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR;
minMipLookup[D3DTEXF_ANISOTROPIC][D3DTEXF_LINEAR] = gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC] ? GL_LINEAR_MIPMAP_LINEAR : GL_LINEAR;
-
/* TODO: config lookups */
More information about the wine-patches
mailing list