[FFmpeg-devel] [PATCH 3/6] avfilter/vf_tpad: Dont clone NULL

Michael Niedermayer michael at niedermayer.cc
Thu Jul 11 01:50:09 EEST 2024


untested

Fixes: CID1440836 Dereference after null check

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavfilter/vf_tpad.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
index 72d0bf338fe..a230a50022c 100644
--- a/libavfilter/vf_tpad.c
+++ b/libavfilter/vf_tpad.c
@@ -132,6 +132,7 @@ static int activate(AVFilterContext *ctx)
             s->cache_start = ff_inlink_peek_frame(inlink, 0);
         } else if (!s->cache_start) {
             FF_FILTER_FORWARD_WANTED(outlink, inlink);
+            return FFERROR_NOT_READY;
         }
         frame = av_frame_clone(s->cache_start);
         if (!frame)
-- 
2.45.2



More information about the ffmpeg-devel mailing list