aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-22 10:56:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-22 10:57:41 +0100
commit8b2578ab452fe2dac09d5df56897f5ecf1602e22 (patch)
tree9a4d1a2d58944d4c98950f22e55b1beb73b0d28e
parentededb5ffed7931680d4506d71c678a80a622ea2b (diff)
parentc453723ad7d14abc5e82677eebaa6025fa598f08 (diff)
downloadffmpeg-8b2578ab452fe2dac09d5df56897f5ecf1602e22.tar.gz
Merge commit 'c453723ad7d14abc5e82677eebaa6025fa598f08'
* commit 'c453723ad7d14abc5e82677eebaa6025fa598f08': gifdec: check that the image dimensions are non-zero Conflicts: libavcodec/gifdec.c See: 286930d302fd34cfc2541bfdd760a8bbf9f2d2e5 Merged-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 ec1585cbca..9305f2e465 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -183,8 +183,10 @@ static int gif_read_image(GifState *s, AVFrame *frame)
if (left + width > s->screen_width ||
top + height > s->screen_height)
return AVERROR_INVALIDDATA;
- if (width <= 0 || height <= 0)
+ if (width <= 0 || height <= 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Invalid image dimensions.\n");
return AVERROR_INVALIDDATA;
+ }
/* process disposal method */
if (s->gce_prev_disposal == GCE_DISPOSAL_BACKGROUND) {