aboutsummaryrefslogtreecommitdiff
path: root/ffserver_config.c
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet2014-12-08 12:42:39 -0300
committerReynaldo H. Verdejo Pinochet2014-12-09 01:03:01 -0300
commitf95cfff07765912676cc613b55e2234b5d70f1bd (patch)
tree38e52e2b1aef380e595a501a1a212706657c9729 /ffserver_config.c
parentdd70470d72758b4e94b17c6808a5ed0c9e8fe097 (diff)
ffserver_config: check strchr() return for NULL
Should fix FFmpeg Coverity Scan issue #1257013 Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Diffstat (limited to 'ffserver_config.c')
-rw-r--r--ffserver_config.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ffserver_config.c b/ffserver_config.c
index ccc35d7e4a..51e3f49795 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -520,7 +520,13 @@ static int ffserver_save_avoption(const char *opt, const char *arg, int type, FF
//explicit private option
snprintf(buff, sizeof(buff), "%s", opt);
codec_name = buff;
- option = strchr(buff, ':');
+ if(!(option = strchr(buff, ':'))){
+ report_config_error(config->filename, config->line_num,
+ AV_LOG_ERROR, &config->errors,
+ "Syntax error. Unmatched ':'\n");
+ return -1;
+
+ }
buff[option - buff] = '\0';
option++;
if ((ret = ffserver_set_codec(ctx, codec_name, config)) < 0)