Charles Hardin pointed an OOM condition where a NULL pointer could be
authorDaniel Veillard <veillard@src.gnome.org>
Wed, 29 Mar 2006 10:17:37 +0000 (10:17 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Wed, 29 Mar 2006 10:17:37 +0000 (10:17 +0000)
* libxslt/transform.c: Charles Hardin pointed an OOM condition where
  a NULL pointer could be dereferenced, closes #336394
Daniel

ChangeLog
libxslt/transform.c

index 2b090d6..37386e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 29 12:16:41 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/transform.c: Charles Hardin pointed an OOM condition where
+         a NULL pointer could be dereferenced, closes #336394
+
 Fri Mar 10 12:49:18 CET 2006 Daniel Veillard <daniel@veillard.com>
 
        * libexslt/crypto.c libexslt/date.c libexslt/saxon.c
index caf41bc..423e2a7 100644 (file)
@@ -638,7 +638,8 @@ xsltCopyTextString(xsltTransformContextPtr ctxt, xmlNodePtr target,
            return(xsltAddTextString(ctxt, target->last, string, len));
        }
        copy = xmlNewTextLen(string, len);
-       copy->name = xmlStringTextNoenc;
+       if (copy != NULL)
+           copy->name = xmlStringTextNoenc;
     } else {
        if ((target != NULL) && (target->last != NULL) &&
            (target->last->type == XML_TEXT_NODE) &&