Skip to content
/ FFmpeg Public
forked from FFmpeg/FFmpeg

Commit

Permalink
lavfi/drawutils: ensure we can't overflow a component
Browse files Browse the repository at this point in the history
  • Loading branch information
rcombs committed Jan 5, 2022
1 parent f00079b commit f320722
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libavfilter/drawutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f320722

Please sign in to comment.