Fixes ticket #11475.
Signed-off-by: James Almer <[email protected]>
---
libavformat/iamf_parse.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c
index 316093b35f..f71ea5315b 100644
--- a/libavformat/iamf_parse.c
+++ b/libavformat/iamf_parse.c
@@ -733,6 +733,12 @@ static int audio_element_obu(void *s, IAMFContext *c,
AVIOContext *pb, int len)
}
num_parameters = ffio_read_leb(pbc);
+ if (num_parameters > 2 && audio_element_type == 0) {
+ av_log(s, AV_LOG_ERROR, "Audio Element parameter count %u is invalid"
+ " for Channel representations\n",
num_parameters);
+ ret = AVERROR_INVALIDDATA;
+ goto fail;
+ }
if (num_parameters && audio_element_type != 0) {
av_log(s, AV_LOG_ERROR, "Audio Element parameter count %u is invalid"
" for Scene representations\n",
num_parameters);
--
2.48.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".