GIFTranslator: Return false if read fails

This commit is contained in:
John Scipione 2014-03-06 02:18:14 -05:00
parent 1fe1074e8d
commit 9592cbe5d8

View File

@ -344,7 +344,8 @@ GIFLoad::ReadGIFImageData()
{
unsigned char newEntry[ENTRY_COUNT];
unsigned char codeSize;
fInput->Read(&codeSize, 1);
if (fInput->Read(&codeSize, 1) < 1)
return false;
if (codeSize > fPalette->size_in_bits) {
if (debug) {