Skip to content

Commit a1cf194

Browse files
author
Eirik Aavitsland
committed
Fixes crash in gif image decoder
Fuzzing test revealed that for certain malformed gif files, qgifhandler would segfault. Change-Id: I5bb6f60e1c61849e0d8c735edc3869945e5331c1 (cherry picked from qtbase/ea2c5417fcd374302f5019e67f72af5facbd29f6) Reviewed-by: Richard J. Moore <[email protected]>
1 parent fb7fa29 commit a1cf194

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gui/image/qgifhandler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,8 @@ void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb co
944944

945945
void QGIFFormat::nextY(unsigned char *bits, int bpl)
946946
{
947+
if (out_of_bounds)
948+
return;
947949
int my;
948950
switch (interlace) {
949951
case 0: // Non-interlaced

0 commit comments

Comments
 (0)