Commit 64fb92ab authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

d3dx9_36: Allocate the right size (Coverity).

parent 120cee4f
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment