[FFmpeg-cvslog] avfilter/vf_avgblur: Check plane instead of AVFrame

Michael Niedermayer git at videolan.org
Wed Jul 24 17:49:08 EEST 2024


ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 11 23:43:37 2024 +0200| [86dfa07e767e021944bfff071a250ec67b9737a1] | committer: Michael Niedermayer

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 at niedermayer.cc>
(cherry picked from commit c296d4fdec198a32ea3995e312cede7be83352c7)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86dfa07e767e021944bfff071a250ec67b9737a1
---

 libavfilter/vf_avgblur.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c
index 7fd65eabfc..070500c37a 100644
--- a/libavfilter/vf_avgblur.c
+++ b/libavfilter/vf_avgblur.c
@@ -273,7 +273,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);



More information about the ffmpeg-cvslog mailing list