Prevent while() from causing potential infinite loops
If xml files don't have proper close tags, don't generate an infinite loop in our library.
This commit is contained in:
@@ -143,7 +143,7 @@ DocPropsCore DocPropsCore::loadFromXmlFile(QIODevice *device)
|
||||
const QString dc = QStringLiteral("http://purl.org/dc/elements/1.1/");
|
||||
const QString dcterms = QStringLiteral("http://purl.org/dc/terms/");
|
||||
|
||||
while(!reader.atEnd()) {
|
||||
while (!reader.atEnd()) {
|
||||
QXmlStreamReader::TokenType token = reader.readNext();
|
||||
if (token == QXmlStreamReader::StartElement) {
|
||||
const QStringRef nsUri = reader.namespaceUri();
|
||||
|
||||
Reference in New Issue
Block a user