Merge commit 'c453723ad7d14abc5e82677eebaa6025fa598f08'

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

Conflicts:
	libavcodec/gifdec.c

See: 286930d302
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-11-22 10:56:42 +01:00
commit 8b2578ab45
1 changed files with 3 additions and 1 deletions

View File

@ -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) {