try to fix the crash raised by the parser in recover mode as pointed by
* parser.c: try to fix the crash raised by the parser in
recover mode as pointed by Ryan Phillips
Daniel
diff --git a/parser.c b/parser.c
index 12b2d7f..a426b79 100644
--- a/parser.c
+++ b/parser.c
@@ -1442,7 +1442,7 @@
if (ctxt->spaceNr > 0)
ctxt->space = &ctxt->spaceTab[ctxt->spaceNr - 1];
else
- ctxt->space = NULL;
+ ctxt->space = &ctxt->spaceTab[0];
ret = ctxt->spaceTab[ctxt->spaceNr];
ctxt->spaceTab[ctxt->spaceNr] = -1;
return(ret);
@@ -2356,7 +2356,7 @@
/*
* Check for xml:space value.
*/
- if (*(ctxt->space) == 1)
+ if ((ctxt->space == NULL) || (*(ctxt->space) == 1))
return(0);
/*