Fix out of buffer access in qt_qimageScaleRgba64_up_xy
Avoid reading a pixel outside the image even if we multiply the result by 0. This mirrors a similar old fix in the the 32bit scaling path. Change-Id: I7860bc808dc46dbc94918672e99c81b56d4a1d27 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>bb10
parent
825e1a0506
commit
384fc28b90
|
|
@ -564,7 +564,10 @@ static void qt_qimageScaleRgba64_up_xy(QImageScaleInfo *isi, QRgba64 *dest,
|
|||
for (int x = 0; x < dw; x++) {
|
||||
const QRgba64 *pix = sptr + xpoints[x];
|
||||
const int xap = xapoints[x];
|
||||
*dptr = interpolate256(pix[0], 256 - xap, pix[1], xap);
|
||||
if (xap > 0)
|
||||
*dptr = interpolate256(pix[0], 256 - xap, pix[1], xap);
|
||||
else
|
||||
*dptr = pix[0];
|
||||
dptr++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue