summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-13 00:06:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-13 00:06:28 +0200
commite0db41316a94d85c1d6ab7ebeaf1f4b5e0f3c76a (patch)
tree9e31a9ebe70eb1f3830fb5caf6fc15dd40f15600 /libavfilter
parentea37df2d528c15dc472e7272ac5278090f01f38e (diff)
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')
-rw-r--r--libavfilter/drawutils.c2
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);