mirror of
https://github.com/reactos/reactos.git
synced 2024-07-30 16:18:43 +00:00
[WIN32K]
In NtGdiGetDIBitsInternal limit the size of what is being copied back to to usermode to the cjMaxInfo parameter. Fixes crash of Firefox when downloading files. CORE-8895 #resolve svn path=/trunk/; revision=66273
This commit is contained in:
parent
5b0af50bdc
commit
e07232f673
|
@ -674,7 +674,7 @@ GreGetDIBitsInternal(
|
|||
RGBQUAD* rgbQuads;
|
||||
VOID* colorPtr;
|
||||
|
||||
DPRINT("Entered NtGdiGetDIBitsInternal()\n");
|
||||
DPRINT("Entered GreGetDIBitsInternal()\n");
|
||||
|
||||
if ((Usage && Usage != DIB_PAL_COLORS) || !Info || !hBitmap)
|
||||
return 0;
|
||||
|
@ -1090,7 +1090,7 @@ NtGdiGetDIBitsInternal(
|
|||
_SEH2_TRY
|
||||
{
|
||||
/* Copy the data back */
|
||||
cjMaxInfo = DIB_BitmapInfoSize(pbmi, (WORD)iUsage);
|
||||
cjMaxInfo = min(cjMaxInfo, DIB_BitmapInfoSize(pbmi, (WORD)iUsage));
|
||||
ProbeForWrite(pbmiUser, cjMaxInfo, 1);
|
||||
RtlCopyMemory(pbmiUser, pbmi, cjMaxInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue