applied fixes for a couple of potential security problems more fixes on
* nanoftp.c: applied fixes for a couple of potential security problems
* tree.c valid.c xmllint.c: more fixes on the string interning checks
Daniel
diff --git a/tree.c b/tree.c
index c324e54..9de498d 100644
--- a/tree.c
+++ b/tree.c
@@ -2270,7 +2270,7 @@
const xmlChar *name, const xmlChar *content) {
xmlNodePtr cur;
- if (doc->dict != NULL)
+ if ((doc != NULL) && (doc->dict != NULL))
cur = xmlNewNodeEatName(ns, (xmlChar *)
xmlDictLookup(doc->dict, name, -1));
else
@@ -2336,7 +2336,7 @@
const xmlChar *name, const xmlChar *content) {
xmlNodePtr cur;
- cur = xmlNewNode(ns, name);
+ cur = xmlNewDocNode(doc, ns, name, NULL);
if (cur != NULL) {
cur->doc = doc;
if (content != NULL) {