Fix gif parsing error for large images
A very large GIF image resulted in cropping of image updates, due to the handler trying to protect against very large values. Increase that size from 200 to 16384, which is also the value used in the withinSizeLimit method. Fixes: QTBUG-85340 Pick-to: 5.15 Change-Id: I70888d76b378ee4f49694e90d7d753fae817ff2a Reviewed-by: Lu YaNing <luyaning@uniontech.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>bb10
parent
1ac7bf1ed4
commit
61fced375a
|
|
@ -342,9 +342,9 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
|
|||
|
||||
// disbelieve ridiculous logical screen sizes,
|
||||
// unless the image frames are also large.
|
||||
if (swidth/10 > qMax(newwidth,200))
|
||||
if (swidth/10 > qMax(newwidth,16384))
|
||||
swidth = -1;
|
||||
if (sheight/10 > qMax(newheight,200))
|
||||
if (sheight/10 > qMax(newheight,16384))
|
||||
sheight = -1;
|
||||
|
||||
if (swidth <= 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue