diff options
-rw-r--r-- | libavcodec/gifdec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index c7b9ac8726..78c8900628 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -237,8 +237,12 @@ static int gif_read_image(GifState *s, AVFrame *frame) pass = 0; y1 = 0; for (y = 0; y < height; y++) { - if (ff_lzw_decode(s->lzw, s->idx_line, width) == 0) + int count = ff_lzw_decode(s->lzw, s->idx_line, width); + if (count != width) { + if (count) + av_log(s->avctx, AV_LOG_ERROR, "LZW decode failed\n"); goto decode_tail; + } pr = ptr + width; |