This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit 8edf97d293ab07c24e48fde2bed9707bdac0b849 Author: Michael Niedermayer <[email protected]> AuthorDate: Sat Nov 14 01:58:22 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Thu Nov 19 14:55:53 2026 +0100 avfilter/vf_signalstats: allocate the histograms for all 16 bit sample values Fixes: out of array write Fixes: 91956.4 is outside the range of representable values of type 'unsigned short' Fixes: 3DKcZFM0ZaFw Fixes: AISLE-2026-0166-00233 Found-by: Joshua Rogers (AISLE) Out of array write Replicated through UnModified FFmpeg with ASAN Float to integer overflow Replicated through UnModified FFmpeg with UBSAN (cherry picked from commit 04955e8b148fa3e7ab022cbb9f5e35c49165ae21) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_signalstats.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index 5859b46478..a69773c208 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -161,10 +161,10 @@ static int config_output(AVFilterLink *outlink) s->vsub = desc->log2_chroma_h; s->depth = desc->comp[0].depth; s->maxsize = 1 << s->depth; - s->histy = av_malloc_array(s->maxsize, sizeof(*s->histy)); - s->histu = av_malloc_array(s->maxsize, sizeof(*s->histu)); - s->histv = av_malloc_array(s->maxsize, sizeof(*s->histv)); - s->histsat = av_malloc_array(s->maxsize, sizeof(*s->histsat)); + s->histy = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histy)); + s->histu = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histu)); + s->histv = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histv)); + s->histsat = av_calloc(1 << (s->depth > 8 ? 16 : 8), sizeof(*s->histsat)); if (!s->histy || !s->histu || !s->histv || !s->histsat) return AVERROR(ENOMEM); @@ -520,7 +520,7 @@ static int compute_sat_hue_metrics16(AVFilterContext *ctx, void *arg, int jobnr, for (i = 0; i < s->chromaw; i++) { const int yuvu = p_u[i]; const int yuvv = p_v[i]; - p_sat[i] = hypotf(yuvu - mid, yuvv - mid); // int or round? + p_sat[i] = (int)hypotf(yuvu - mid, yuvv - mid); // int or round? ((int16_t*)p_hue)[i] = fmodf(floorf((180.f / M_PI) * atan2f(yuvu-mid, yuvv-mid) + 180.f), 360.f); } p_u += lsz_u; -- 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]
