1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

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
This commit is contained in:
Daniel Veillard
2006-06-18 19:55:20 +00:00
parent a4bd369232
commit dbcbbd2657
2 changed files with 7 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
Sun Jun 18 20:59:02 EDT 2006 Daniel Veillard <daniel@veillard.com>
* parser.c: try to fix the crash raised by the parser in
recover mode as pointed by Ryan Phillips
Sun Jun 18 18:44:56 EDT 2006 Daniel Veillard <daniel@veillard.com>
* python/types.c: patch from Nic Ferrier to provide a better type

View File

@@ -1442,7 +1442,7 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
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 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
/*
* Check for xml:space value.
*/
if (*(ctxt->space) == 1)
if ((ctxt->space == NULL) || (*(ctxt->space) == 1))
return(0);
/*