aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-22 11:00:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-22 11:00:02 +0100
commit564ae836fb7bf73cddf39a0cc47108b5f067c126 (patch)
tree569ce8b45383b1a92c1f11a954577973c5bf1d8f
parent8b2578ab452fe2dac09d5df56897f5ecf1602e22 (diff)
downloadffmpeg-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.c4
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;