fixed segfault when input file not present changed output formatting of

* xmlIO.c: fixed segfault when input file not present
* tree.c: changed output formatting of XML_CDATA_SECTION
  (bug 120917)
diff --git a/ChangeLog b/ChangeLog
index 8397133..3e32483 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Oct 19 17:33:27 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+	* xmlIO.c: fixed segfault when input file not present
+	* tree.c: changed output formatting of XML_CDATA_SECTION
+	  (bug 120917)
+	
 Sun Oct 19 00:15:38 HKT 2003 William Brack <wbrack@mmm.com.hk>
 
 	* include/libxml/parserInternals.h HTMLparser.c HTMLtree.c
diff --git a/tree.c b/tree.c
index b612ffd..24044e0 100644
--- a/tree.c
+++ b/tree.c
@@ -7481,7 +7481,8 @@
     if (format == 1) {
 	tmp = cur->children;
 	while (tmp != NULL) {
-	    if ((tmp->type == XML_TEXT_NODE) || 
+	    if ((tmp->type == XML_TEXT_NODE) ||
+		(tmp->type == XML_CDATA_SECTION_NODE) ||
 		(tmp->type == XML_ENTITY_REF_NODE)) {
 		format = 0;
 		break;
diff --git a/xmlIO.c b/xmlIO.c
index d8508cd..8014f86 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -3083,6 +3083,7 @@
     if (ret == NULL) {
 	xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
 	             (const char *) resource);
+	return(NULL);
     }
     if ((ret->buf != NULL) && (ret->buf->readcallback == xmlIOHTTPRead)) {
         const char *encoding;