Commit 8b2578ab authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c453723a'

* commit 'c453723a':
  gifdec: check that the image dimensions are non-zero

Conflicts:
	libavcodec/gifdec.c

See: 286930d3Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ededb5ff c453723a
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment