aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-11 23:43:37 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-02 21:57:25 +0200
commitc296d4fdec198a32ea3995e312cede7be83352c7 (patch)
treeb1603994829036c72e064d703e8680d5ff90a6ac
parent34f821e44821804e1954ca6eb38269183978a62c (diff)
downloadffmpeg-c296d4fdec198a32ea3995e312cede7be83352c7.tar.gz
avfilter/vf_avgblur: Check plane instead of AVFrame
Fixes: CID1551694 Use after free (false positive based on assuming that out == in and one is freed and one used) Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavfilter/vf_avgblur.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c
index ced0a2ac28..cbaeb974e5 100644
--- a/libavfilter/vf_avgblur.c
+++ b/libavfilter/vf_avgblur.c
@@ -288,7 +288,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
const int width = s->planewidth[plane];
if (!(s->planes & (1 << plane))) {
- if (out != in)
+ if (out->data[plane] != in->data[plane])
av_image_copy_plane(out->data[plane], out->linesize[plane],
in->data[plane], in->linesize[plane],
width * ((s->depth + 7) / 8), height);