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:
@@ -388,6 +388,10 @@ GIFLoad::ReadGIFImageData()
|
|||||||
continue;
|
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) {
|
if (fTable[fNewCode] != NULL) {
|
||||||
// exists in table
|
// exists in table
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user