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 b355200263 avcodec/mjpegdec: require progress in AVRn interlaced field
loop
b355200263 is described below
commit b3552002637ab5546dc5df294810d3981465af86
Author: Michael Niedermayer <[email protected]>
AuthorDate: Thu Jun 4 20:51:43 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Fri Jun 5 11:49:42 2026 +0000
avcodec/mjpegdec: require progress in AVRn interlaced field loop
Fixes: Timeout
Fixes:
500554625/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MEDIA100_fuzzer-5094103347167232
Fixes:
511253447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-5780722463080448
Found-by: continuous fuzzing process
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/mjpegdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index d72646206b..742d3ac4c0 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1439,6 +1439,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s)
int linesize[MAX_COMPONENTS];
GetBitContext mb_bitmask_gb = {0}; // initialize to silence gcc warning
int bytes_per_pixel = 1 + (s->bits > 8);
+ int field_pos = -1;
int ret;
if (s->avctx->codec_id == AV_CODEC_ID_MXPEG) {
@@ -1572,9 +1573,11 @@ next_field:
if (s->interlaced &&
bytestream2_get_bytes_left(&s->gB) > 2 &&
bytestream2_tell(&s->gB) > 2 &&
+ bytestream2_tell(&s->gB) != field_pos &&
s->gB.buffer[-2] == 0xFF &&
s->gB.buffer[-1] == 0xD1) {
av_log(s->avctx, AV_LOG_DEBUG, "AVRn interlaced picture marker
found\n");
+ field_pos = bytestream2_tell(&s->gB);
s->bottom_field ^= 1;
goto next_field;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]