This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 057526695752595970f5d90caa740e430911be19 Author: Michael Niedermayer <[email protected]> AuthorDate: Mon Oct 19 02:15:57 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Tue Oct 20 01:28:04 2026 +0000 avformat/rtpenc: Reject packet sizes too small for one sample Fixes: infinite loop Fixes: bz6tTr9RAaZT Fixes: ffmpeg -f lavfi -i sine=d=0.2 -c:a pcm_s16be -f rtp -packetsize 13 /dev/null Fixes: ffmpeg -f lavfi -i sine=d=0.2 -ar 8000 -c:a g726 -b:a 24k -f rtp -packetsize 14 /dev/null Endless loop Replicated through UnModified FFmpeg Found during triage of the security report TwYfznAFyatl (#22717) --- libavformat/rtpenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 1c91e32fbe..b42a0f2d4b 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -434,6 +434,11 @@ static int rtp_send_samples(AVFormatContext *s1, int aligned_samples_size = sample_size_bits/av_gcd(sample_size_bits, 8); max_packet_size = (s->max_payload_size / aligned_samples_size) * aligned_samples_size; + if (!max_packet_size) { + av_log(s1, AV_LOG_ERROR, "RTP max payload size too small for %d byte samples\n", + aligned_samples_size); + return AVERROR(EINVAL); + } /* Not needed, but who knows. Don't check if samples aren't an even number of bytes. */ if ((sample_size_bits % 8) == 0 && ((8 * size) % sample_size_bits) != 0) return AVERROR(EINVAL); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
