potential NULL dereference on non-glibc

* SAX2.c (xmlCheckDefaultedAttributes): When xmlStrdup and/or
  xmlStrcat fails due to OOM avoid printing NULL via a printf-style "%s"
  format
diff --git a/SAX2.c b/SAX2.c
index 164409c..8dc1d58 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1420,6 +1420,10 @@
 		    } else {
 			fulln = xmlStrdup(attr->name);
 		    }
+                    if (fulln == NULL) {
+                        xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
+                        break;
+                    }
 
 		    /*
 		     * Check that the attribute is not declared in the