GIFTranslator: error if out of bounds

Error out if we're trying to access an out-of-bounds array index
(which should never happen, but let's check just in case.)
This commit is contained in:
John Scipione 2014-03-04 01:20:18 -05:00
parent 2dcb2d8684
commit f4b507313b

View File

@ -388,6 +388,10 @@ GIFLoad::ReadGIFImageData()
continue;
}
// error out if we're trying to access an out-of-bounds index
if (fNextCode >= ENTRY_COUNT)
goto bad_end;
if (fTable[fNewCode] != NULL) {
// exists in table