# HG changeset patch # User rbultje # Date 1273510856 0 # Node ID 83b49b0997e8e43370a187659465bd8247c25bae # Parent 9a4c9c165b3b3c0bc8c58cc0537bca43169d744a Ensure that width and height are > 0. avcodec_open() itself only checks that they are >= 0. Patch by Sebastian Vater . diff -r 9a4c9c165b3b -r 83b49b0997e8 iff.c --- a/iff.c Mon May 10 07:08:57 2010 +0000 +++ b/iff.c Mon May 10 17:00:56 2010 +0000 @@ -115,6 +115,8 @@ return AVERROR_INVALIDDATA; } + if ((err = avcodec_check_dimensions(avctx, avctx->width, avctx->height))) + return err; s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE); if (!s->planebuf)