From 0db5c89c5fe839f18b50e5501108f5c70993e7d2 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 25 Apr 2019 23:08:17 +0200 Subject: [PATCH] Initialize the unread bits of _starttab oss-fuzz #14446 --- src/imageformats/rgb.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/imageformats/rgb.cpp b/src/imageformats/rgb.cpp index 432def8..a288eef 100644 --- a/src/imageformats/rgb.cpp +++ b/src/imageformats/rgb.cpp @@ -336,6 +336,9 @@ bool SGIImage::readImage(QImage &img) _stream >> _starttab[l]; _starttab[l] -= 512 + _numrows * 2 * sizeof(quint32); } + for (; l < _numrows; l++) { + _starttab[l] = 0; + } _lengthtab = new quint32[_numrows]; for (l = 0; l < _numrows; l++) {