Marcus Meissner : d3dx9_36: Allocate the right size (Coverity).
Alexandre Julliard
julliard at winehq.org
Mon May 27 13:46:54 CDT 2013
Module: wine
Branch: master
Commit: 64fb92ab380d8bfc90e390289e22bf39d54219ed
URL: http://source.winehq.org/git/wine.git/?a=commit;h=64fb92ab380d8bfc90e390289e22bf39d54219ed
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sat May 25 09:04:37 2013 +0200
d3dx9_36: Allocate the right size (Coverity).
---
dlls/d3dx9_36/surface.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index ed93eb4..1df0cf2 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -1134,8 +1134,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface,
hr = IWICPalette_GetColorCount(wic_palette, &nb_colors);
if (SUCCEEDED(hr))
{
- colors = HeapAlloc(GetProcessHeap(), 0, nb_colors * sizeof(colors));
- palette = HeapAlloc(GetProcessHeap(), 0, nb_colors * sizeof(palette));
+ colors = HeapAlloc(GetProcessHeap(), 0, nb_colors * sizeof(colors[0]));
+ palette = HeapAlloc(GetProcessHeap(), 0, nb_colors * sizeof(palette[0]));
if (!colors || !palette)
hr = E_OUTOFMEMORY;
}
More information about the wine-cvs
mailing list