found and fixed a bug misallocating some non blank text node strings from

* SAX2.c: found and fixed a bug misallocating some non
  blank text node strings from the dictionnary.
* xmlmemory.c: fixed a problem with the memory debug mutex
  release.
Daniel
diff --git a/ChangeLog b/ChangeLog
index 363564f..59cb11c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Jan  2 11:40:06 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+	* SAX2.c: found and fixed a bug misallocating some non
+	  blank text node strings from the dictionnary.
+	* xmlmemory.c: fixed a problem with the memory debug mutex
+	  release.
+
 Wed Dec 31 22:02:37 HKT 2003 William Brack <wbrack@mmm.com.hk>
 
 	* xinclude.c: fixed problem caused by wrong dictionary
diff --git a/SAX2.c b/SAX2.c
index 0ec19ca..d27d574 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1670,7 +1670,7 @@
 	    int i;
 
 	    for (i = 1;i < len;i++) {
-		if (!IS_BLANK_CH(*str)) goto skip;
+		if (!IS_BLANK_CH(str[i])) goto skip;
 	    }
 	    intern = xmlDictLookup(ctxt->dict, str, len);
 	}
diff --git a/xmlmemory.c b/xmlmemory.c
index d8fa2b9..55831d7 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -822,6 +822,7 @@
         return;
 
     xmlFreeMutex(xmlMemMutex);
+    xmlMemMutex = NULL;
     xmlMemInitialized = 0;
 }