aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-23 20:20:37 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-06-26 20:55:11 +0200
commit10801166589ab49ca2793cea306fcf3e5654995e (patch)
tree2eb0feea9d0d2d64d9e200428dec64746069dfe9
parentc221c7422f07f2245db5c4cdc958b42ca25eb2b7 (diff)
downloadffmpeg-10801166589ab49ca2793cea306fcf3e5654995e.tar.gz
avcodec/aac/aacdec_usac: Test ac in usac
ff_aac_usac_config_decode() needs AACDecContext to be set but some callers pass NULL. Happens only when the LATM decoder is used, and USAC is not supported in LATM Fixes: member access within null pointer of type 'AACDecContext' (aka 'struct AACDecContext') Fixes: 69435/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5733527483121664 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>
-rw-r--r--libavcodec/aac/aacdec_usac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 132ffee9c2..4856c1786b 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -348,6 +348,9 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx,
int map_pos_set = 0;
uint8_t layout_map[MAX_ELEM_ID*4][3] = { 0 };
+ if (!ac)
+ return AVERROR_PATCHWELCOME;
+
memset(usac, 0, sizeof(*usac));
freq_idx = get_bits(gb, 5); /* usacSamplingFrequencyIndex */