Commit 43a5381209 for ffmpeg
commit 43a53812094b5e9ffd02bfce550eb1ad8c3c372d
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Fri Nov 6 02:05:06 2026 +0100
avfilter/vsrc_mandelbrot: skip the inner coloring when no iteration ran
This is not a security issue.
Fixes: out of array read
Fixes: use of uninitialized memory
Fixes: LPW4jFrf2FjP
Fixes: swarm-Unbounded-OOB-heap-read-in-PERIOD-inner-coloring-when-maxiter-8-74e806
Found-by: zhang xingxing <2388969553@qq.com>
Out of array read Replicated through UnModified FFmpeg with ASAN
Use of uninitialized memory Replicated through UnModified FFmpeg with Valgrind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 3f14f1e7f9..0d0e28e8fa 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -345,7 +345,7 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
break;
}
}
- if(!c){
+ if(!c && i){
if(s->inner==PERIOD){
int j;
for(j=i-1; j; j--)