diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 11:00:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 11:00:02 +0100 |
commit | 564ae836fb7bf73cddf39a0cc47108b5f067c126 (patch) | |
tree | 569ce8b45383b1a92c1f11a954577973c5bf1d8f | |
parent | 8b2578ab452fe2dac09d5df56897f5ecf1602e22 (diff) | |
download | ffmpeg-564ae836fb7bf73cddf39a0cc47108b5f067c126.tar.gz |
avcodec/gifdec: print error if image is not within dimensions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/gifdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index 9305f2e465..a6b6be0470 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -181,8 +181,10 @@ static int gif_read_image(GifState *s, AVFrame *frame) /* verify that all the image is inside the screen dimensions */ if (left + width > s->screen_width || - top + height > s->screen_height) + top + height > s->screen_height) { + av_log(s->avctx, AV_LOG_ERROR, "image is outside the screen dimensions.\n"); return AVERROR_INVALIDDATA; + } if (width <= 0 || height <= 0) { av_log(s->avctx, AV_LOG_ERROR, "Invalid image dimensions.\n"); return AVERROR_INVALIDDATA; |