summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-10-21 00:22:46 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-10-21 22:57:10 +0200
commite85eb7cb04cefa37c7f8e78aac381aa8377dea0f (patch)
tree85de81746fe1d213cfcf9a6e50f18a1164366b32 /libavcodec
parent6079bd5c63e5ef50d110f622d3fab02a48c3a2b0 (diff)
downloadffmpeg-streaming-e85eb7cb04cefa37c7f8e78aac381aa8377dea0f.zip
ffmpeg-streaming-e85eb7cb04cefa37c7f8e78aac381aa8377dea0f.tar.gz
avcodec/atrac9dec: Set channels
Fixes: null pointer dereference Fixes: 18341/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5681203490848768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/atrac9dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index 46e60ca..b0f659d 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -873,6 +873,7 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx)
s->block_config = &at9_block_layout[block_config_idx];
avctx->channel_layout = s->block_config->channel_layout;
+ avctx->channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
if (get_bits1(&gb)) {
OpenPOWER on IntegriCloud