diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-13 00:06:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-13 00:06:28 +0200 |
commit | e0db41316a94d85c1d6ab7ebeaf1f4b5e0f3c76a (patch) | |
tree | 9e31a9ebe70eb1f3830fb5caf6fc15dd40f15600 /libavfilter/drawutils.c | |
parent | ea37df2d528c15dc472e7272ac5278090f01f38e (diff) | |
download | ffmpeg-e0db41316a94d85c1d6ab7ebeaf1f4b5e0f3c76a.tar.gz |
avfilter/drawutils: Fix format validity check in ff_draw_init()
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/drawutils.c')
-rw-r--r-- | libavfilter/drawutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c index 0b2f17e52a..3a1abbd95a 100644 --- a/libavfilter/drawutils.c +++ b/libavfilter/drawutils.c @@ -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); |