Browse Source

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>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
8b2578ab45
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/gifdec.c

+ 3
- 1
libavcodec/gifdec.c 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) {


Loading…
Cancel
Save