aboutsummaryrefslogtreecommitdiffstats
path: root/testHTML.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-08-14 15:13:33 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-08-14 15:13:33 +0000
commit1255ab77803cdd9b90bd5baa2dc85f2c3e8115ec (patch)
tree8b31a7f553720899c22d55780b75ccc2a49a0e82 /testHTML.c
parent0310929cc4726341ad3fb63fd67b035f6bde3901 (diff)
downloadandroid_external_libxml2-1255ab77803cdd9b90bd5baa2dc85f2c3e8115ec.tar.gz
android_external_libxml2-1255ab77803cdd9b90bd5baa2dc85f2c3e8115ec.tar.bz2
android_external_libxml2-1255ab77803cdd9b90bd5baa2dc85f2c3e8115ec.zip
Patch from Dave Yearke <yearke@eng.buffalo.edu>:
- testHTML.c: fix core dump on Solaris 2.x systems - HTMLparser.c: fix segfault if ctxt->sax->characters() is NULL - result/HTML/*.sax: previous bug fix lead to new results Daniel
Diffstat (limited to 'testHTML.c')
-rw-r--r--testHTML.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/testHTML.c b/testHTML.c
index 85e2e82d..721f0e51 100644
--- a/testHTML.c
+++ b/testHTML.c
@@ -146,7 +146,8 @@ internalSubsetDebug(void *ctx, const xmlChar *name,
/* xmlDtdPtr externalSubset; */
fprintf(stdout, "SAX.internalSubset(%s, %s, %s)\n",
- name, ExternalID, SystemID);
+ name, (ExternalID == NULL) ? "(null)" : ExternalID,
+ (SystemID == NULL) ? "(null)" : SystemID);
/***********
if ((ExternalID != NULL) || (SystemID != NULL)) {
@@ -372,7 +373,7 @@ startElementDebug(void *ctx, const xmlChar *name, const xmlChar **atts)
if (atts != NULL) {
for (i = 0;(atts[i] != NULL);i++) {
fprintf(stdout, ", %s='", atts[i++]);
- fprintf(stdout, "%s'", atts[i]);
+ fprintf(stdout, "%s'", (atts[i] == NULL) ? "(null)" : atts[i]);
}
}
fprintf(stdout, ")\n");