PR #24704 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24704 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24704.patch
Fixes: stack-buffer-underflow Fixes: YrUfC4ZuDBNi Fixes: ANT-2026-1B7JHPCG Found-by: Anthropic agents; validated and reported by Ada Logics. >From 0ba1313a8e2344ec2eb42de116658cffeb75add2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Fri, 25 Sep 2026 05:28:36 +0200 Subject: [PATCH] avutil/avsscanf: mask the ring buffer index when decfloat appends a zero digit group Fixes: stack-buffer-underflow Fixes: YrUfC4ZuDBNi Fixes: ANT-2026-1B7JHPCG Found-by: Anthropic agents; validated and reported by Ada Logics. --- libavutil/avsscanf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/avsscanf.c b/libavutil/avsscanf.c index a0dfb20459..0a49295e76 100644 --- a/libavutil/avsscanf.c +++ b/libavutil/avsscanf.c @@ -438,7 +438,7 @@ static double decfloat(FFFILE *f, int c, int bits, int emin, int sign, int pok) /* Assemble desired bits into floating point variable */ for (y=i=0; i<LD_B1B_DIG; i++) { - if ((a+i & MASK)==z) x[(z=(z+1 & MASK))-1] = 0; + if ((a+i & MASK)==z) x[(z=(z+1 & MASK))-1 & MASK] = 0; y = 1000000000.0L * y + x[a+i & MASK]; } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
