mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 05:55:07 +00:00
avfilter/drawutils: Fix format validity check in ff_draw_init()
Found-by: Daemon404 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ea37df2d52
commit
e0db41316a
@ -160,7 +160,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
|
||||
unsigned i, nb_planes = 0;
|
||||
int pixelstep[MAX_PLANES] = { 0 };
|
||||
|
||||
if (!desc->name)
|
||||
if (!desc || !desc->name)
|
||||
return AVERROR(EINVAL);
|
||||
if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL | AV_PIX_FMT_FLAG_ALPHA))
|
||||
return AVERROR(ENOSYS);
|
||||
|
Loading…
Reference in New Issue
Block a user