Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/5] avcodec/aac/aacdec_usac: Test ac in usac
@ 2024-06-23 23:01 Michael Niedermayer
  2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 2/5] avcodec/hevc/hevcdec: Do not allow changes to parameter sets between slices Michael Niedermayer
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Michael Niedermayer @ 2024-06-23 23:01 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

ff_aac_usac_config_decode() needs AACDecContext to be set but some callers
pass NULL.

I have no real testcase to implement/test this, so failing in this case
seems safest.

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
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/aac/aacdec_usac.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 132ffee9c20..4856c1786b7 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 */
-- 
2.45.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-07-15 15:16 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-23 23:01 [FFmpeg-devel] [PATCH 1/5] avcodec/aac/aacdec_usac: Test ac in usac Michael Niedermayer
2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 2/5] avcodec/hevc/hevcdec: Do not allow changes to parameter sets between slices Michael Niedermayer
2024-06-25  8:59   ` Anton Khirnov
2024-06-25 23:27     ` Michael Niedermayer
2024-06-26  6:36       ` Anton Khirnov
2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 3/5] avcodec/hevc/hevcdec: SPS not set (or cleared) after frame start Michael Niedermayer
2024-06-25  9:00   ` Anton Khirnov
2024-06-25 23:52     ` Michael Niedermayer
2024-06-26  6:38       ` Anton Khirnov
2024-06-26 23:05         ` Michael Niedermayer
2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 4/5] avcodec/hevc/hevcdec: Do not allow slices to depend on failed slices Michael Niedermayer
2024-06-25  9:04   ` Anton Khirnov
2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 5/5] avformat/iamf: Check substreams in ff_iamf_free_audio_element() Michael Niedermayer
2024-07-15 14:25   ` Michael Niedermayer
2024-07-15 15:16   ` James Almer
2024-06-25 23:35 ` [FFmpeg-devel] [PATCH 1/5] avcodec/aac/aacdec_usac: Test ac in usac Lynne via ffmpeg-devel
2024-06-25 23:57   ` Michael Niedermayer
2024-06-26  6:58     ` Lynne via ffmpeg-devel
2024-06-26 18:57       ` Michael Niedermayer
2024-06-26 19:45       ` Andreas Rheinhardt
2024-06-26 22:46         ` Lynne via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git