diff options
-rw-r--r-- | src/corelib/plugin/qcoffpeparser.cpp | 2 | ||||
-rw-r--r-- | src/corelib/plugin/qelfparser_p.cpp | 2 | ||||
-rw-r--r-- | tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/plugin/qcoffpeparser.cpp b/src/corelib/plugin/qcoffpeparser.cpp index 03eca7d2b6..4813a07b27 100644 --- a/src/corelib/plugin/qcoffpeparser.cpp +++ b/src/corelib/plugin/qcoffpeparser.cpp @@ -380,7 +380,7 @@ QLibraryScanResult QCoffPeParser::parse(QByteArrayView data, QString *errMsg) size_t offset = section->PointerToRawData; if (size_t end; qAddOverflow<size_t>(offset, section->SizeOfRawData, &end) || end > size_t(data.size())) - return error(QLibrary::tr("a section data extends past the end of the file")); + return error(QLibrary::tr("section contents extend past the end of the file")); DWORD type = section->Characteristics & (IMAGE_SCN_CNT_CODE | IMAGE_SCN_CNT_INITIALIZED_DATA diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index ed973e4323..c6ccda92fb 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -714,7 +714,7 @@ static QLibraryScanResult scanSections(QByteArrayView data, const ErrorMaker &er continue;; if (T::Off end; qAddOverflow(shdr->sh_offset, shdr->sh_size, &end) || end > size_t(data.size())) { - return error(QLibrary::tr("a section data extends past the end of the file")); + return error(QLibrary::tr("section contents extend past the end of the file")); } if (name != QLatin1String(".qtmetadata")) diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp index 8c68cfde0d..fcce21433e 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp @@ -755,17 +755,17 @@ void tst_QPluginLoader::loadCorruptElfOldPlugin_data() // arbitrary section bounds checks // section index = 0 is usually a NULL section, so we try 1 - newRow("section1-starts-past-eof", "a section data extends past the end of the file", + newRow("section1-starts-past-eof", "section contents extend past the end of the file", [](H h, QFile *f) { ElfShdr *s = getSection(h, 1); s->sh_offset = f->size(); }); - newRow("section1-ends-past-eof", "a section data extends past the end of the file", + newRow("section1-ends-past-eof", "section contents extend past the end of the file", [](H h, QFile *f) { ElfShdr *s = getSection(h, 1); s->sh_size = f->size() + 1 - s->sh_offset; }); - newRow("section1-bounds-overflow", "a section data extends past the end of the file", [](H h) { + newRow("section1-bounds-overflow", "section contents extend past the end of the file", [](H h) { ElfShdr *s = getSection(h, 1); s->sh_size = -sizeof(*s); }); |