aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKieran Kunhya <kierank@obe.tv>2015-10-26 23:09:44 +0000
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-26 16:58:32 +0100
commitcde478f52691c142514ce3dc80dfbb3d7741cd2b (patch)
treec38d9c5d1bd2732727c603ddf2487cb7cbea0a5a
parent31a5bde1bf1f5271527fc9aa7f7e4db0a65f4aa3 (diff)
downloadffmpeg-cde478f52691c142514ce3dc80dfbb3d7741cd2b.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index 04c9218840..ab81de1aa7 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -542,7 +542,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));