diff --git a/ChangeLog b/ChangeLog index 66c0d564..7c0d2752 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Feb 20 09:56:47 CET 2004 Daniel Veillard + + * 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 * xmlreader.c: fixed xmllint --memory --stream memory consumption diff --git a/result/att7 b/result/att7 new file mode 100644 index 00000000..56d08359 --- /dev/null +++ b/result/att7 @@ -0,0 +1,11 @@ + + + + +"> +]> + + + &test.ent; + diff --git a/result/att7.rdr b/result/att7.rdr new file mode 100644 index 00000000..47b19b4d --- /dev/null +++ b/result/att7.rdr @@ -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 diff --git a/result/att7.sax b/result/att7.sax new file mode 100644 index 00000000..c0932792 --- /dev/null +++ b/result/att7.sax @@ -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), ) +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() diff --git a/result/noent/att7 b/result/noent/att7 new file mode 100644 index 00000000..a58a04d0 --- /dev/null +++ b/result/noent/att7 @@ -0,0 +1,11 @@ + + + + +"> +]> + + + + diff --git a/test/att7 b/test/att7 new file mode 100644 index 00000000..cd31c3d2 --- /dev/null +++ b/test/att7 @@ -0,0 +1,10 @@ + + + +"> +]> + + + &test.ent; + diff --git a/tree.c b/tree.c index 219f2d98..12a83ceb 100644 --- a/tree.c +++ b/tree.c @@ -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') {