Fail if less then one entire line requested in GetBitmapBits32.
This commit is contained in:
parent
cb505623c1
commit
1f43de3456
@ -288,6 +288,13 @@ LONG WINAPI GetBitmapBits32(
|
|||||||
height = count / bmp->bitmap.bmWidthBytes;
|
height = count / bmp->bitmap.bmWidthBytes;
|
||||||
if (height > bmp->bitmap.bmHeight) height = bmp->bitmap.bmHeight;
|
if (height > bmp->bitmap.bmHeight) height = bmp->bitmap.bmHeight;
|
||||||
count = height * bmp->bitmap.bmWidthBytes;
|
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",
|
TRACE(bitmap, "(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n",
|
||||||
hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
|
hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user