Commit 34dce12052 for ffmpeg
commit 34dce120524ade7c97a2db19fc4703a4dc73d523
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Sat Nov 14 00:35:47 2026 +0100
avfilter/vf_curves: allocate the lookup tables for all 16 bit sample values
Fixes: out of array read
Fixes: 6MsWULeKEl3N
Fixes: AISLE-2026-0166-00695
Found-by: Joshua Rogers (AISLE)
Out of array read Replicated through UnModified FFmpeg with ASAN
diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c
index 69e9c5257c..717ef08cdc 100644
--- a/libavfilter/vf_curves.c
+++ b/libavfilter/vf_curves.c
@@ -882,7 +882,7 @@ static int config_input(AVFilterLink *inlink)
for (i = 0; i < NB_COMP + 1; i++) {
if (!curves->graph[i])
- curves->graph[i] = av_calloc(curves->lut_size, sizeof(*curves->graph[0]));
+ curves->graph[i] = av_calloc(1 << (curves->is_16bit ? 16 : 8), sizeof(*curves->graph[0]));
if (!curves->graph[i])
return AVERROR(ENOMEM);
ret = parse_points_str(ctx, comp_points + i, curves->comp_points_str[i], curves->lut_size);