Skip to content

Commit

Permalink
Fix column number accounting in xmlParse*NameAndCompare
Browse files Browse the repository at this point in the history
Thanks to Frederic Vancraeyveldt for the report.
  • Loading branch information
nwellnhof committed Aug 9, 2020
1 parent 438e595 commit b82fa3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -3487,10 +3487,10 @@ xmlParseNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *other) {
while (*in != 0 && *in == *cmp) {
++in;
++cmp;
ctxt->input->col++;
}
if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) {
/* success */
ctxt->input->col += in - ctxt->input->cur;
ctxt->input->cur = in;
return (const xmlChar*) 1;
}
Expand Down Expand Up @@ -8820,6 +8820,7 @@ xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name,
}
if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) {
/* success */
ctxt->input->col += in - ctxt->input->cur;
ctxt->input->cur = in;
return((const xmlChar*) 1);
}
Expand Down

0 comments on commit b82fa3d

Please sign in to comment.