[FFmpeg-cvslog] avformat/iamf_parse: reject ambisonics mode > 1
Michael Niedermayer
git at videolan.org
Fri Dec 20 03:15:31 EET 2024
ffmpeg | branch: release/7.1 | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov 29 02:28:18 2024 +0100| [88126fc4ecff16c8337bab0ff33bee858a18d555] | committer: James Almer
avformat/iamf_parse: reject ambisonics mode > 1
ambisonics mode > 1 does not initialize any layer but layer 0
is unconditionally dereferenced
Fixes: poc-2024-11
Fixes: null pointer dereference
Found-by: 苏童 <220235212 at seu.edu.cn>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 4cc1495aca45445181a107a682c32cfe31459929)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88126fc4ecff16c8337bab0ff33bee858a18d555
---
libavformat/iamf_parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c
index e0a138a07d..decd4bc437 100644
--- a/libavformat/iamf_parse.c
+++ b/libavformat/iamf_parse.c
@@ -413,7 +413,7 @@ static int ambisonics_config(void *s, AVIOContext *pb,
ambisonics_mode = ffio_read_leb(pb);
if (ambisonics_mode > 1)
- return 0;
+ return AVERROR_INVALIDDATA;
output_channel_count = avio_r8(pb); // C
substream_count = avio_r8(pb); // N
More information about the ffmpeg-cvslog
mailing list