Commit de46025a0c for ffmpeg
commit de46025a0cdf74b2e316efe05ef2d153990fdcf5
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Mon Oct 19 02:15:40 2026 +0200
avformat/rtpenc: Reject packet sizes too small for the VC-2 payload header
Fixes: heap-buffer-overflow
Fixes: zZoxZuoiTRhn
Out of array write Replicated through UnModified FFmpeg with ASAN
Found during triage of the security report TwYfznAFyatl (#22717)
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index b3a5b0ff35..8f14fee073 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -204,6 +204,7 @@ static int rtp_write_header(AVFormatContext *s1)
ret = AVERROR_EXPERIMENTAL;
goto fail;
}
+ payload_header_size = 20;
break;
case AV_CODEC_ID_H263:
if (s->flags & FF_RTP_FLAG_RFC2190) {