Commit 1f43de34 authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

Fail if less then one entire line requested in GetBitmapBits32.

parent cb505623
......@@ -288,6 +288,13 @@ LONG WINAPI GetBitmapBits32(
height = count / bmp->bitmap.bmWidthBytes;
if (height > bmp->bitmap.bmHeight) height = bmp->bitmap.bmHeight;
count = height * bmp->bitmap.bmWidthBytes;
if (count == 0)
{
WARN(bitmap, "Less then one entire line requested\n");
GDI_HEAP_UNLOCK( hbitmap );
return 0;
}
TRACE(bitmap, "(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n",
hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
......
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