[FFmpeg-cvslog] avfilter/vf_rotate: Check ff_draw_init2() return value

Michael Niedermayer git at videolan.org
Thu Jun 13 23:42:27 EEST 2024


ffmpeg | branch: release/5.1 | Michael Niedermayer <michael at niedermayer.cc> | Mon Jun  3 19:51:49 2024 +0200| [293b368b81b77e3143b6147c59c0773872101ebf] | committer: Michael Niedermayer

avfilter/vf_rotate: Check ff_draw_init2() return value

Fixes: NULL pointer dereference
Fixes: 3_343

Found-by: De3mond
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9c9f095e30c196c0e3d510dc5300182ddb49a803)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavfilter/vf_rotate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c
index 4429e3d543..e7d720e80a 100644
--- a/libavfilter/vf_rotate.c
+++ b/libavfilter/vf_rotate.c
@@ -288,7 +288,9 @@ static int config_props(AVFilterLink *outlink)
     double res;
     char *expr;
 
-    ff_draw_init(&rot->draw, inlink->format, 0);
+    ret = ff_draw_init(&rot->draw, inlink->format, 0);
+    if (ret < 0)
+        return ret;
     ff_draw_color(&rot->draw, &rot->color, rot->fillcolor);
 
     rot->hsub = pixdesc->log2_chroma_w;



More information about the ffmpeg-cvslog mailing list