Mercurial > libavcodec.hg
changeset 11699:83b49b0997e8 libavcodec
Ensure that width and height are > 0. avcodec_open() itself only checks that
they are >= 0.
Patch by Sebastian Vater <cdgs basty googlemail com>.
author | rbultje |
---|---|
date | Mon, 10 May 2010 17:00:56 +0000 |
parents | 9a4c9c165b3b |
children | 6bdec2a0e7e1 |
files | iff.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)