rgb: fix crash in fuzzed file

This commit is contained in:
Albert Astals Cid 2019-01-28 21:10:18 +01:00
parent 188271a5d0
commit 0e21713267

View File

@ -144,6 +144,9 @@ bool SGIImage::getRow(uchar *dest)
if (_bpc == 2) { if (_bpc == 2) {
_pos++; _pos++;
} }
if (_pos >= _data.end()) {
return false;
}
n = *_pos & 0x7f; n = *_pos & 0x7f;
if (!n) { if (!n) {
break; break;