Projects
Essentials
A_tw-ffmpeg-4
ffmpeg-4-CVE-2026-65705-part02-24c322f.patch
Sign Up
Log In
Username
Password
Sorry, you are not authorized to perform this action.
×
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ffmpeg-4-CVE-2026-65705-part02-24c322f.patch of Package A_tw-ffmpeg-4
From 24c322fdb232d0a3f3790d544dcb64e5c2138e79 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <michael@niedermayer.cc> Date: Sat, 11 Jul 2026 16:47:28 +0200 Subject: [PATCH] avfilter/vf_floodfill: size the point stack for the current frame Fixes: out of array access Fixes: 8aj_floodfill_dynamic_size.pgm / 8aj_generate_floodfill_dynamic_size_pgm.py Fixes: 3MleMXjGZvu3 Found-by: Adrian Junge (vurlo) <adjun37@gmail.com> --- libavfilter/vf_floodfill.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_floodfill.c b/libavfilter/vf_floodfill.c index 3876211ecab2761cac9111a7345768eafb9a56e5..f9f8ee9327aab98f84f420e134affd3710daa0f8 100644 --- a/libavfilter/vf_floodfill.c +++ b/libavfilter/vf_floodfill.c @@ -40,6 +40,7 @@ typedef struct FloodfillContext { int nb_planes; Points *points; + unsigned int points_size; int (*is_same)(AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3); @@ -269,9 +270,6 @@ static int config_input(AVFilterLink *inlink) } } - s->points = av_calloc(inlink->w * inlink->h, 4 * sizeof(Points)); - if (!s->points) - return AVERROR(ENOMEM); return 0; } @@ -290,9 +288,23 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) int s3 = s->s[3]; const int w = frame->width; const int h = frame->height; + size_t nb_points, points_size; int i, ret; int front = 0; + if (w > UINT16_MAX + 1 || h > UINT16_MAX + 1 || + av_size_mult(w, h, &nb_points) < 0 || + av_size_mult(nb_points, 4 * sizeof(*s->points), &points_size) < 0) { + av_frame_free(&frame); + return AVERROR(EINVAL); + } + + av_fast_malloc(&s->points, &s->points_size, points_size); + if (!s->points) { + av_frame_free(&frame); + return AVERROR(ENOMEM); + } + if (is_inside(s->x, s->y, w, h)) { s->pick_pixel(frame, s->x, s->y, &s0, &s1, &s2, &s3); -- 2.51.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.