fixed a couple of stupid bugs in the state allocation routines which led

* relaxng.c: fixed a couple of stupid bugs in the state allocation
  routines which led to bug #120040 and the ones reported by
  Martijn Faassen
Daniel
This commit is contained in:
Daniel Veillard 2003-08-25 10:57:27 +00:00
parent 123e93d7ac
commit 73827cbedf
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Mon Aug 25 12:37:05 CEST 2003 Daniel Veillard <daniel@veillard.com>
* relaxng.c: fixed a couple of stupid bugs in the state allocation
routines which led to bug #120040 and the ones reported by
Martijn Faassen
Mon Aug 25 12:37:23 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
* include/libxml/parserInternals.h include/libxml/relaxng.h

View File

@ -1076,6 +1076,7 @@ xmlRelaxNGNewValidState(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node)
return (ret);
}
ret->attrs = tmp;
ret->maxAttrs = nbAttrs;
}
ret->nbAttrs = nbAttrs;
if (nbAttrs < MAX_ATTR) {
@ -1153,6 +1154,7 @@ xmlRelaxNGCopyValidState(xmlRelaxNGValidCtxtPtr ctxt,
return (ret);
}
ret->maxAttrs = state->maxAttrs;
ret->attrs = tmp;
}
memcpy(ret->attrs, state->attrs, state->nbAttrs * sizeof(xmlAttrPtr));
}