Commit 93ef29b6 authored by Michael Niedermayer's avatar Michael Niedermayer

noise_bsf: fix division by 0

Fixes CID733737
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c73b1a1d
......@@ -32,6 +32,9 @@ static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const ch
int amount= args ? atoi(args) : (*state % 10001+1);
int i;
if(amount <= 0)
return AVERROR(EINVAL);
*poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
......
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