After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676026 - xmlGetLineNo(...) - 65535 row limit
xmlGetLineNo(...) - 65535 row limit
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
2.7.8
Other Linux
: Normal critical
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-14 12:21 UTC by Andrea Poli
Modified: 2017-06-08 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
./SAX2.c & ./include/libxml/tree.h patch (335 bytes, application/x-gzip)
2012-05-14 12:21 UTC, Andrea Poli
Details

Description Andrea Poli 2012-05-14 12:21:02 UTC
Created attachment 213996 [details]
./SAX2.c & ./include/libxml/tree.h patch

xmlGetLineNo bug: if a XML file has more than 65535 rows then GetLineNo returns 65535 for each row greater than 65535.

The following files have been modified:
- include/libxml/tree.h
- SAX2.c

See the related patch files:
- include/libxml/tree.h.patch
- SAX2.c.patch
Comment 1 Andrea Poli 2012-05-15 13:22:18 UTC
The PHP method DOMNode::getLineNo() doesn't work properly due to this bug. 

http://www.php.net/manual/en/domnode.getlineno.php
Comment 2 Christoph M. Becker 2015-06-03 22:22:22 UTC
As of libxml2 2.9.0 the option XML_PARSE_BIG_LINES[1] is available, which allows to disable this restriction. It is documented as opt-in (most likely for backward compatibility reasons), so it seems this ticket can be closed.

[1] <https://git.gnome.org/browse/libxml2/commit/include/libxml/parser.h?id=968a03a2e54f5bcf53089f5e3c8f790dbe0bf824>