ffmpeg | branch: release/5.0 | rcombs <rco...@rcombs.me> | Thu Dec 23 19:48:24 
2021 -0600| [55ff7356bf805f6d038d1b2555c44c114ae7a58a] | committer: rcombs

lavfi/drawutils: ensure we can't overflow a component

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

 libavfilter/drawutils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 99c124822d..bcdb669bd3 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -112,6 +112,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat 
format, unsigned flags)
         if (depthb && (depthb != db))
             return AVERROR(ENOSYS);
         depthb = db;
+        if (db * (c->offset + 1) > 16)
+            return AVERROR(ENOSYS);
         /* strange interleaving */
         if (pixelstep[c->plane] != 0 &&
             pixelstep[c->plane] != c->step)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to