[FFmpeg-cvslog] avfilter/drawutils: Fix format validity check in ff_draw_init()
Michael Niedermayer
git at videolan.org
Sat Jun 13 00:17:14 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 13 00:06:28 2015 +0200| [e0db41316a94d85c1d6ab7ebeaf1f4b5e0f3c76a] | committer: Michael Niedermayer
avfilter/drawutils: Fix format validity check in ff_draw_init()
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0db41316a94d85c1d6ab7ebeaf1f4b5e0f3c76a
---
libavfilter/drawutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 0b2f17e..3a1abbd 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);
More information about the ffmpeg-cvslog
mailing list