diff options
author | Kieran Kunhya <kierank@obe.tv> | 2015-10-26 23:09:44 +0000 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-19 03:51:38 +0100 |
commit | d52d5553b8dc557561262b61be104c2fa819f243 (patch) | |
tree | 486de842f3543d1a1f12265d8c258451ef002a69 /libavcodec | |
parent | a456a5285d15bb27578f2d8ba2bc7d2899afdb9f (diff) | |
download | ffmpeg-d52d5553b8dc557561262b61be104c2fa819f243.tar.gz |
opusdec: Don't run vector_fmul_scalar on zero length arrays
Fixes crashes on fuzzed files
Fixes Ticket4969 part2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b3e5f15b95f04a35821f63f6fd89ddd60f666a59)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/opusdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c index 2ee3f2ad36..3f383aeec2 100644 --- a/libavcodec/opusdec.c +++ b/libavcodec/opusdec.c @@ -538,7 +538,7 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data, memset(frame->extended_data[i], 0, frame->linesize[0]); } - if (c->gain_i) { + if (c->gain_i && decoded_samples > 0) { c->fdsp->vector_fmul_scalar((float*)frame->extended_data[i], (float*)frame->extended_data[i], c->gain, FFALIGN(decoded_samples, 8)); |