Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.11.1
-
None
-
Windows 10 Pro, Version 1803, OS Build 17134.165,
Qt 5.11.1,Kit MSVSC2015 32bit, QtCreator 4.6.2.
Description
When parsing XML of size 8226 bytes QXmlStreamReader causes access violation.
I have simple XML with one lagre mutli line comment.Comment itself has 8019 characters, including whitespace characters, whereas entire XML file has 8266 characters.
I have checked that XML is valid in Notepad++ with XML Tools plugin and also on xmlvalidation.xml.
When I execute example I have access violation in QIODevice.cpp.
Now, if I remove last "o" character from comment in XML(or any other character from comment, or e.g. "6" from text of element6, or as a matter of fact any character from XML while keeping XML valid), example is executed successfully. In actual solution XML have a lot of comments, resulting file to be larger that 8KB. For now, as a workaround, I remove comments to avoid access violation. But those comments describes each config parameter and I would rather keep them.
It is not clear to me how does comment/file length causes access violation.
main.cpp config.xml and XmlParser.pro are attached.