Permalink
Browse files

xmlAttrSerializeTxtContent don't segfault if NULL is passed. adding a…

…n old

* tree.c: xmlAttrSerializeTxtContent don't segfault if NULL
  is passed.
* test/att7 result//att7*: adding an old regression test
  laying around on my laptop
Daniel
  • Loading branch information...
1 parent 2192452 commit cb35f01d948e8d8ef8d25a85181a148a75130887 Daniel Veillard committed Feb 20, 2004
Showing with 75 additions and 0 deletions.
  1. +7 −0 ChangeLog
  2. +11 −0 result/att7
  3. +11 −0 result/att7.rdr
  4. +24 −0 result/att7.sax
  5. +11 −0 result/noent/att7
  6. +10 −0 test/att7
  7. +1 −0 tree.c
View
@@ -1,3 +1,10 @@
+Fri Feb 20 09:56:47 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: xmlAttrSerializeTxtContent don't segfault if NULL
+ is passed.
+ * test/att7 result//att7*: adding an old regression test
+ laying around on my laptop
+
Thu Feb 19 17:33:36 CET 2004 Daniel Veillard <daniel@veillard.com>
* xmlreader.c: fixed xmllint --memory --stream memory consumption
View
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!DOCTYPE x [
+<!ELEMENT x (test)*>
+<!ELEMENT test EMPTY>
+<!ATTLIST test att CDATA "attvalue">
+<!ENTITY test.ent "<test/>">
+]>
+<x>
+ <test/>
+ &test.ent;
+</x>
View
@@ -0,0 +1,11 @@
+0 10 x 0 0
+0 1 x 0 0
+1 14 #text 0 1
+
+1 1 test 1 0
+1 14 #text 0 1
+
+1 5 test.ent 0 0
+1 14 #text 0 1
+
+0 15 x 0 0
View
@@ -0,0 +1,24 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.internalSubset(x, , )
+SAX.elementDecl(x, 4, ...)
+SAX.elementDecl(test, 1, ...)
+SAX.attributeDecl(test, att, 1, 1, attvalue, ...)
+SAX.entityDecl(test.ent, 1, (null), (null), <test/>)
+SAX.getEntity(test.ent)
+SAX.externalSubset(x, , )
+SAX.startElement(x)
+SAX.characters(
+ , 5)
+SAX.startElement(test)
+SAX.endElement(test)
+SAX.characters(
+ , 5)
+SAX.getEntity(test.ent)
+SAX.startElement(test)
+SAX.endElement(test)
+SAX.reference(test.ent)
+SAX.characters(
+, 1)
+SAX.endElement(x)
+SAX.endDocument()
View
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!DOCTYPE x [
+<!ELEMENT x (test)*>
+<!ELEMENT test EMPTY>
+<!ATTLIST test att CDATA "attvalue">
+<!ENTITY test.ent "<test/>">
+]>
+<x>
+ <test/>
+ <test/>
+</x>
View
@@ -0,0 +1,10 @@
+<!DOCTYPE x [
+<!ELEMENT x (test*)>
+<!ELEMENT test EMPTY>
+<!ATTLIST test att CDATA "attvalue">
+<!ENTITY test.ent "<test/>">
+]>
+<x>
+ <test/>
+ &test.ent;
+</x>
View
@@ -7016,6 +7016,7 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
xmlAttrPtr attr, const xmlChar *string) {
xmlChar *base, *cur;
+ if (string == NULL) return;
base = cur = (xmlChar *)string;
while (*cur != 0) {
if (*cur == '\n') {

0 comments on commit cb35f01

Please sign in to comment.