Skip to content

Commit

Permalink
gif_read: Set last_name = NULL unconditionally.
Browse files Browse the repository at this point in the history
With a non-malicious GIF, last_name is set to NULL when a name
extension is followed by an image. Reported in #117, via
Debian, via a KAIST fuzzing program.
  • Loading branch information
kohler committed Dec 3, 2017
1 parent f1b8e63 commit 118a460
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gifread.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ read_gif(Gif_Reader *grr, int read_flags,
Gif_DeleteArray(gfc.suffix);
Gif_DeleteArray(gfc.length);
gfc.gfi = 0;
last_name = 0;

if (gfs)
gfs->errors = gfc.errors[1];
Expand Down

0 comments on commit 118a460

Please sign in to comment.