applied fix from Christopher Boumenot for bug #362714 on regexps missing

* xmlregexp.c: applied fix from Christopher Boumenot for bug
  #362714 on regexps missing ']'
Daniel
diff --git a/xmlregexp.c b/xmlregexp.c
index 58f480d..e7d519e 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -4807,6 +4807,11 @@
     int start = -1;
     int end = -1;
 
+    if (CUR == '\0') {
+        ERROR("Expecting ']'");
+	return;
+    }
+
     if ((CUR == '&') && (NXT(1) == '#')) {
 	end = start = xmlFAParseCharRef(ctxt);
         xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
@@ -4897,7 +4902,7 @@
 	    xmlFAParseCharRange(ctxt);
 	}
     } while ((CUR != ']') && (CUR != '^') && (CUR != '-') &&
-	     (ctxt->error == 0));
+             (CUR != 0) && (ctxt->error == 0));
 }
 
 /**