diff options
| author | Axel Spoerl <axel.spoerl@qt.io> | 2023-08-10 13:30:43 +0200 |
|---|---|---|
| committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-08-15 07:16:31 +0200 |
| commit | ccd8a496cf46313ea0df9fe70f4e4b57f9434b24 (patch) | |
| tree | a425d00e9df74e7b983fc856ab67526f5b558483 /src/plugins/platforms/android/androidcontentfileengine.cpp | |
| parent | 56bd5d60c9fb9b9078847e4c4919956af3cbf08a (diff) | |
QXmlStreamReader::readNextStartElement() - return false on document end
The method reads the next element in a loop, as long as valid elements
exist. Within the loop, it returns
- false if the end of an element has been reached
- true if a new element has started
When the document end has been reached, the loop continues, until
readNext() returns Invalid. Then, PrematureEndOfDocumentError is launched.
This is wrong, because reading beyond the document end is caused by a
missing return condition in the loop.
=> Treat document end like element end and return false without
reading beyond it.
=> Test correct behavior in tst_QXmlStream::readNextStartElement()
Fixes: QTBUG-25944
Pick-to: 6.6 6.5 6.2
Change-Id: I0160b65880756a2be541e9f55dc79557fcb1f09f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/android/androidcontentfileengine.cpp')
0 files changed, 0 insertions, 0 deletions
