Fixes crash in gif image decoder

Fuzzing test revealed that for certain malformed gif files,
qgifhandler would segfault.

Change-Id: I5bb6f60e1c61849e0d8c735edc3869945e5331c1
Reviewed-by: Richard J. Moore <rich@kde.org>
bb10
Eirik Aavitsland 2015-03-11 09:00:41 +01:00 committed by aavit
parent afaf8a1650
commit d3048a2979
1 changed files with 2 additions and 0 deletions

View File

@ -936,6 +936,8 @@ void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb co
void QGIFFormat::nextY(unsigned char *bits, int bpl)
{
if (out_of_bounds)
return;
int my;
switch (interlace) {
case 0: // Non-interlaced