[FFmpeg-cvslog] avcodec/gifdec: print error if image is not within dimensions

Michael Niedermayer git at videolan.org
Fri Nov 22 11:05:35 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov 22 11:00:02 2013 +0100| [564ae836fb7bf73cddf39a0cc47108b5f067c126] | committer: Michael Niedermayer

avcodec/gifdec: print error if image is not within dimensions

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=564ae836fb7bf73cddf39a0cc47108b5f067c126
---

 libavcodec/gifdec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index 9305f2e..a6b6be0 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;



More information about the ffmpeg-cvslog mailing list