This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 91fcca692f avformat/rtpenc_jpeg: check that a marker segment lies
within the frame
91fcca692f is described below
commit 91fcca692fc96a8213b341de88d05a7c0866152c
Author: Michael Niedermayer <[email protected]>
AuthorDate: Thu Sep 24 00:16:33 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Sat Oct 3 20:18:06 2026 +0000
avformat/rtpenc_jpeg: check that a marker segment lies within the frame
Fixes: read into padding
Fixes: 1SLVIPZzDH7n
Found-by: zhang xingxing
Suggested-by: zhang xingxing
Replicated through Modified FFmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavformat/rtpenc_jpeg.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/rtpenc_jpeg.c b/libavformat/rtpenc_jpeg.c
index e4e95931f4..ddbce261d4 100644
--- a/libavformat/rtpenc_jpeg.c
+++ b/libavformat/rtpenc_jpeg.c
@@ -50,6 +50,11 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t
*buf, int size)
if (buf[i] != 0xff)
continue;
+ if (size - i < 5 || (buf[i + 1] == SOF0 && size - i < 18)) {
+ av_log(s1, AV_LOG_ERROR, "Too short JPEG header. Aborted!\n");
+ return;
+ }
+
if (buf[i + 1] == DQT) {
int tables, j;
if (buf[i + 4] & 0xF0)
--
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]