Skip to content
Snippets Groups Projects
Commit 5a4f5ce8 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard
Browse files

windowscodecs: Limit number of colors in a palette in BMP decoder.

parent 0b428f88
No related branches found
No related tags found
No related merge requests found
......@@ -271,7 +271,7 @@ static HRESULT WINAPI BmpFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface,
if (This->bih.bV5ClrUsed == 0)
count = 1 << This->bih.bV5BitCount;
else
count = This->bih.bV5ClrUsed;
count = min(This->bih.bV5ClrUsed, 1 << This->bih.bV5BitCount);
tablesize = sizeof(WICColor) * count;
wiccolors = HeapAlloc(GetProcessHeap(), 0, tablesize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment