Commit 3c0d62b4 authored by David Warring's avatar David Warring Committed by Nick Wellnhofer
Browse files

Fix parser termination from "Double hyphen within comment" error

The patch fixes the parser not halting immediately when the error
handler attempts to stop the parser.

Rather it was running on and continuing to reference the freed buffer
in the while loop termination test.

This is only a problem if xmlStopParser is called from an error
handler. Probably caused by commit 123234f2. Fixes #58.
parent 96125557
......@@ -4955,6 +4955,10 @@ get_more:
} else
xmlFatalErrMsgStr(ctxt, XML_ERR_HYPHEN_IN_COMMENT,
"Double hyphen within comment\n", NULL);
if (ctxt->instate == XML_PARSER_EOF) {
xmlFree(buf);
return;
}
in++;
ctxt->input->col++;
}
......
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