summaryrefslogtreecommitdiff
path: root/libpostproc/postprocess.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-11 22:24:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-11 22:28:42 +0100
commitf6173fed608b81e70f40664f356d127618851427 (patch)
tree48f214f4ff9b314f431a36450c36894ac046fd3c /libpostproc/postprocess.c
parent9ab5cf5417d7ee48bb3c4c78c79cc437c4a9efd3 (diff)
downloadffmpeg-f6173fed608b81e70f40664f356d127618851427.tar.gz
postproc: fix null pointer dereference with invalid option strings
Fixes CID1135760 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libpostproc/postprocess.c')
-rw-r--r--libpostproc/postprocess.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index b34943f983..da586ffd31 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -719,6 +719,10 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
if(filterToken == NULL) break;
p+= strlen(filterToken) + 1; // p points to next filterToken
filterName= strtok(filterToken, optionDelimiters);
+ if (filterName == NULL) {
+ ppMode->error++;
+ break;
+ }
av_log(NULL, AV_LOG_DEBUG, "pp: %s::%s\n", filterToken, filterName);
if(*filterName == '-'){