mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 18:01:07 +00:00
[VGADDI]
- Fix buffer overflow in DIB_BltFromVGA. A byte fits two pixels. svn path=/trunk/; revision=74382
This commit is contained in:
parent
e9940a928b
commit
599c80f8f2
|
@ -369,6 +369,7 @@ void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
|
|||
stride = 0;
|
||||
rightcount = w;
|
||||
}
|
||||
rightcount = (rightcount + 1) / 2;
|
||||
|
||||
/* Reset the destination. */
|
||||
for (j = 0; j < h; j++)
|
||||
|
@ -414,7 +415,7 @@ void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
|
|||
|
||||
row = UnpackPixel[pixel] << plane;
|
||||
|
||||
/* Store the data for each pixel in the destination. */
|
||||
/* Store the data for each byte in the destination. */
|
||||
for (i = 0; i < rightcount; i++)
|
||||
{
|
||||
((PUCHAR)destline)[i] |= (row & 0xFF);
|
||||
|
|
Loading…
Reference in a new issue