GIFTranslator: Return false if read fails
This commit is contained in:
parent
1fe1074e8d
commit
9592cbe5d8
@ -344,7 +344,8 @@ GIFLoad::ReadGIFImageData()
|
|||||||
{
|
{
|
||||||
unsigned char newEntry[ENTRY_COUNT];
|
unsigned char newEntry[ENTRY_COUNT];
|
||||||
unsigned char codeSize;
|
unsigned char codeSize;
|
||||||
fInput->Read(&codeSize, 1);
|
if (fInput->Read(&codeSize, 1) < 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (codeSize > fPalette->size_in_bits) {
|
if (codeSize > fPalette->size_in_bits) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
|
Loading…
Reference in New Issue
Block a user