mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 20:18:28 +00:00
d3dx9_36: Allocate the right size (Coverity).
This commit is contained in:
parent
120cee4f85
commit
64fb92ab38
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue