autogenerate a minimal NULL value sequence for unknown pointer types This

* gentest.py testapi.c: autogenerate a minimal NULL value sequence
  for unknown pointer types
* HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c
  parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c
  xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c
  xpointer.c: This uncovered an impressive amount of entry points
  not checking for NULL pointers when they ought to, closing all
  the open gaps.
Daniel
diff --git a/xmlstring.c b/xmlstring.c
index 78acbff..a4dc44c 100644
--- a/xmlstring.c
+++ b/xmlstring.c
@@ -745,7 +745,8 @@
     return(c);
 
 error:
-    *len = 0;
+    if (len != NULL)
+	*len = 0;
     return(-1);
 }
 
@@ -768,6 +769,8 @@
     int ix;
     unsigned char c;
 
+    if (utf == NULL)
+        return(0);
     /*
      * utf is a string of 1, 2, 3 or 4 bytes.  The valid strings
      * are as follows (in "bit format"):