From 561a365dca6e392c5f6cd718784c57627819eef4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 Jul 2012 19:14:21 +0200 Subject: [PATCH] pp: check that the argument is not NULL as this is not supported Signed-off-by: Michael Niedermayer --- libpostproc/postprocess.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 62eb3b2de0..2234ba8c76 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -728,6 +728,11 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality) struct PPMode *ppMode; char *filterToken; + if (!name) { + av_log(NULL, AV_LOG_ERROR, "pp: Missing argument\n"); + return NULL; + } + if (!strcmp(name, "help")) { const char *p; for (p = pp_help; strchr(p, '\n'); p = strchr(p, '\n') + 1) {