PR #23468 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23468 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23468.patch
Fixes: heap buffer overflow Signed-off-by: Michael Niedermayer <[email protected]> >From 31f7d6d0abde13dda4b7c3f302993194f30faad1 Mon Sep 17 00:00:00 2001 From: jiale yao <[email protected]> Date: Fri, 12 Jun 2026 17:26:09 +0200 Subject: [PATCH] avformat/rtpenc_amr: Check input size Fixes: heap buffer overflow Signed-off-by: Michael Niedermayer <[email protected]> --- libavformat/rtpenc_amr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/rtpenc_amr.c b/libavformat/rtpenc_amr.c index 8df5a3cf3e..f88784a86c 100644 --- a/libavformat/rtpenc_amr.c +++ b/libavformat/rtpenc_amr.c @@ -35,6 +35,9 @@ void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size) uint8_t *p; int len; + if (size < 1) + return; + /* Test if the packet must be sent. */ len = s->buf_ptr - s->buf; if (s->num_frames && -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
