Skip to content

Commit de0f820

Browse files
committed
check for premature end of file
fixes #31
1 parent bc5daf3 commit de0f820

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ngiflib.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,8 @@ int LoadGif(struct ngiflib_gif * g) {
761761
while( (size = GetByte(g)) ) {
762762
u8 ext[256];
763763

764-
GetByteStr(g, ext, size);
764+
if (GetByteStr(g, ext, size) != 0)
765+
return -1;
765766

766767
switch(id) {
767768
case 0xF9: /* Graphic Control Extension */

0 commit comments

Comments
 (0)