diff options
author | Kieran Kunhya <kierank@obe.tv> | 2015-10-26 23:09:44 +0000 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-30 17:55:31 +0100 |
commit | 2f5f940befc5733ab986bd58a85a6ba8c0bcc9c9 (patch) | |
tree | 2d7e46dfd918d591c35f06ac3160dff6acd76451 | |
parent | 6ac9d6303f0d6913be7fad742dcd98e66f2d6339 (diff) | |
download | ffmpeg-2f5f940befc5733ab986bd58a85a6ba8c0bcc9c9.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>
-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 6025f679a2..31871e9994 100644 --- a/libavcodec/opusdec.c +++ b/libavcodec/opusdec.c @@ -585,7 +585,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)); |