mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 00:00:09 +00:00
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
This commit is contained in:
committed by
Christian Savinovich
parent
a5b463cabf
commit
f9bb53a1dd
@@ -2913,7 +2913,10 @@ int read_config_maps(void)
|
|||||||
ast_copy_string(buf, v->value, sizeof(buf));
|
ast_copy_string(buf, v->value, sizeof(buf));
|
||||||
stringp = buf;
|
stringp = buf;
|
||||||
driver = strsep(&stringp, ",");
|
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, '\"')))
|
if ((tmp = strchr(stringp, '\"')))
|
||||||
stringp = tmp;
|
stringp = tmp;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user