Skip to content

Commit

Permalink
Only discard block terminator once.
Browse files Browse the repository at this point in the history
  • Loading branch information
lecram committed May 1, 2021
1 parent 863b75b commit 0226985
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gifdec.c
Expand Up @@ -391,7 +391,8 @@ read_image_data(gd_GIF *gif, int interlace)
table->entries[table->nentries - 1].suffix = entry.suffix;
}
free(table);
read(gif->fd, &sub_len, 1); /* Must be zero! */
if (key == stop)
read(gif->fd, &sub_len, 1); /* Must be zero! */
lseek(gif->fd, end, SEEK_SET);
return 0;
}
Expand Down

0 comments on commit 0226985

Please sign in to comment.