Skip to content

Commit

Permalink
case of a semi-broken gif without a termination record
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Sep 17, 2024
1 parent 5f4bd3d commit a163a33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions img/codec_gif.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ load( PImgCodec instance, PImgLoadFileInstance fi)
GIF_CALL DGifGetRecordType( l-> gft, &l-> grt);
if ( GIF_CALL_FAILED ) {
/* handle premature EOF gracefully */
if ( fi-> frameCount < 0 && l-> passed < fi-> frame)
fi-> frameCount = l-> passed;
if ( fi-> frameCount < 0 && l-> passed <= fi-> frame)
fi-> frameCount = l-> passed + 1;
out(l->gft);
}

Expand Down

0 comments on commit a163a33

Please sign in to comment.