Commit aa39a0fb authored by Daniel Veillard's avatar Daniel Veillard
Browse files

patch from Jack J Franklin to remove a bug in xmlCreatePushParserCtxt()

* parser.c: patch from Jack J Franklin to remove a bug in
  xmlCreatePushParserCtxt() when the initial buffer passed
  is large.
Daniel
parent 0e47ee29
Sun Jan 6 13:45:49 CET 2002 Daniel Veillard <daniel@veillard.com>
* parser.c: patch from Jack J Franklin to remove a bug in
xmlCreatePushParserCtxt() when the initial buffer passed
is large.
Sat Jan 5 19:24:23 CET 2002 Daniel Veillard <daniel@veillard.com>
* win32/*: big cleanup of the Windows/MSVC project files
......
......@@ -8783,7 +8783,15 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
(ctxt->input->buf != NULL)) {
int base = ctxt->input->base - ctxt->input->buf->buffer->content;
int cur = ctxt->input->cur - ctxt->input->base;
xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
ctxt->input->base = ctxt->input->buf->buffer->content + base;
ctxt->input->cur = ctxt->input->base + cur;
ctxt->input->end =
&ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext, "PP: pushed %d\n", size);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment