Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-22 14:00:02 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-11-22 14:00:02 +0400
commit564ae836fb7bf73cddf39a0cc47108b5f067c126 (patch)
tree569ce8b45383b1a92c1f11a954577973c5bf1d8f /libavcodec/gifdec.c
parent8b2578ab452fe2dac09d5df56897f5ecf1602e22 (diff)
avcodec/gifdec: print error if image is not within dimensions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/gifdec.c')
-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;