diff options
author | Juergen Keil <jrgn.keil@googlemail.com> | 2014-08-07 16:28:09 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2014-08-07 16:28:09 +0800 |
commit | 5d4310af453a2220851b7063ebf165ce8b47494c (patch) | |
tree | bf9f2a834f8809b16840b85afa99c360ae54b45e /parser.c | |
parent | d201e71ed0df1dce7aca232f81a1c3e2eee8be73 (diff) | |
download | android_external_libxml2-5d4310af453a2220851b7063ebf165ce8b47494c.tar.gz android_external_libxml2-5d4310af453a2220851b7063ebf165ce8b47494c.tar.bz2 android_external_libxml2-5d4310af453a2220851b7063ebf165ce8b47494c.zip |
wrong error column in structured error when skipping whitespace in xml decl
For https://bugzilla.gnome.org/show_bug.cgi?id=734276
libxml2 reports wrong error column numbers (field int2 in xmlError)
in structured error handler, after an XML declaration containing
whitespace.
Example XML:
<?xml version="1.0" encoding="UTF-8" ?><root>&</root>
<!--
1 2 3 4 5 6
123456789012345678901234567890123456789012345678901234567890
-->
Expected location of the error would be line 1, column 53.
The actual location of the error is line 1, column 44:
$ ./xmlparse colbug1.xml
colbug1.xml:1:44: xmlParseEntityRef: no name
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2109,6 +2109,8 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) { while (IS_BLANK_CH(*cur)) { if (*cur == '\n') { ctxt->input->line++; ctxt->input->col = 1; + } else { + ctxt->input->col++; } cur++; res++; |