From: Chris-Savinovich Date: Thu, 4 Apr 2019 21:02:42 +0000 (-0500) Subject: config.c: Fix a crash in extconfig parsing X-Git-Tag: 13.27.0-rc1~30^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9bb53a1ddbc2f059e76cc969f2a38d389899234;p=thirdparty%2Fasterisk.git config.c: Fix a crash in extconfig parsing When extconfig.conf file is parsed, the code previously searched for character comma without verifying if error (null or blank). This caused a segmentation error. Change-Id: Id76b452d8f330d11c2742c37232761ad71472a8b --- diff --git a/main/config.c b/main/config.c index d864af2e09..0267979e8c 100644 --- a/main/config.c +++ b/main/config.c @@ -2913,7 +2913,10 @@ int read_config_maps(void) ast_copy_string(buf, v->value, sizeof(buf)); stringp = buf; driver = strsep(&stringp, ","); - + if (!stringp) { + ast_log(LOG_WARNING, "extconfig.conf: value '%s' ignored due to wrong format\n", v->value); + continue; + } if ((tmp = strchr(stringp, '\"'))) stringp = tmp;