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

@ -70,6 +70,7 @@ Users may have to change how they access the system
### Corrected Bugs ### Corrected Bugs
* Fixed [Crash seen with startup mode as running with the XML_DB format being set to JSON. [clixon : 4.7.0] #138](https://github.com/clicon/clixon/issues/138)
* Fixed: Performance enhancement of unique list check (of duplicate keys) * Fixed: Performance enhancement of unique list check (of duplicate keys)
* Fixed: Validate/commit error with false positive yang choice changes detected in validation found in ietf-ipfix-psamp.yang. * Fixed: Validate/commit error with false positive yang choice changes detected in validation found in ietf-ipfix-psamp.yang.
* Fixed: Accepted added subtrees containing lists with duplicate keys. * Fixed: Accepted added subtrees containing lists with duplicate keys.

View file

@ -1230,7 +1230,11 @@ _json_parse(char *str,
/* RFC 7951 Section 4: A namespace-qualified member name MUST be used for all /* RFC 7951 Section 4: A namespace-qualified member name MUST be used for all
* members of a top-level JSON object * 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){ if ((cberr = cbuf_new()) == NULL){
clicon_err(OE_UNIX, errno, "cbuf_new"); clicon_err(OE_UNIX, errno, "cbuf_new");
goto done; goto done;