diff --git a/lib/src/clixon_xml_db.c b/lib/src/clixon_xml_db.c index e9dfa23e..08fb4c71 100644 --- a/lib/src/clixon_xml_db.c +++ b/lib/src/clixon_xml_db.c @@ -1011,7 +1011,7 @@ xmldb_get_local(clicon_handle h, /* If vectors are specified then filter out everything else, * otherwise return complete tree. */ - if (xvec0 && xlen0){ + if (xvec != NULL) for (i=0; iys_keyword){ case Y_LEAF_LIST: + if (restval==NULL){ + clicon_err(OE_XML, 0, "malformed key, expected '='"); + goto done; + } cprintf(ckey, "=%s", restval); break; case Y_LIST: @@ -1629,6 +1634,10 @@ xmldb_put_xkey_local(clicon_handle h, /* The value is a list of keys: [ ]* */ if ((cvk = yang_arg2cvec(ykey, " ")) == NULL) goto done; + if (restval==NULL){ + clicon_err(OE_XML, 0, "malformed key, expected '='"); + goto done; + } if ((valvec = clicon_strsplit(restval, ",", &nvalvec, __FUNCTION__)) == NULL) goto done;