Crash seen with startup mode as running with the XML_DB format being set to JSON. [clixon : 4.7.0] #138

This commit is contained in:
Olof hagsand 2020-10-17 10:01:04 +02:00
parent 4d35ace95f
commit 46bee9e358
2 changed files with 6 additions and 1 deletions

View file

@ -1230,7 +1230,11 @@ _json_parse(char *str,
/* RFC 7951 Section 4: A namespace-qualified member name MUST be used for all
* members of a top-level JSON object
*/
if (yspec && xml_prefix(x) == NULL){
if (yspec && xml_prefix(x) == NULL
#ifdef XMLDB_CONFIG_HACK
&& strcmp(xml_name(x), "config") != 0
#endif
){
if ((cberr = cbuf_new()) == NULL){
clicon_err(OE_UNIX, errno, "cbuf_new");
goto done;