Commit 8d8616a510 for ffmpeg
commit 8d8616a51000186400b9bbe9d952d94bc587507b
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Tue Oct 6 07:33:43 2026 +0200
avformat/rtpdec_opus: Reject empty payloads
RFC 7587 4.2 and RFC 6716 [R1]: a payload holds one Opus packet of at least 1 byte
The check is the one recommended in the report.
Fixes: use of uninitialized memory
Fixes: eytzTgq45tAh
Fixes: AISLE-2026-0111-00215
Use of uninitialized memory Replicated through UnModified FFmpeg with MSAN
Found-by: Joshua Rogers <joshua.rogers@aisle.com>
diff --git a/libavformat/rtpdec_opus.c b/libavformat/rtpdec_opus.c
index 4ed9d8842b..1eeef3c4b6 100644
--- a/libavformat/rtpdec_opus.c
+++ b/libavformat/rtpdec_opus.c
@@ -96,6 +96,9 @@ static int opus_parse_packet(AVFormatContext *ctx, PayloadContext *data,
int rv;
int duration;
+ if (!len)
+ return AVERROR_INVALIDDATA;
+
if ((rv = av_new_packet(pkt, len)) < 0)
return rv;