summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qelfparser_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/plugin/qelfparser_p.cpp')
-rw-r--r--src/corelib/plugin/qelfparser_p.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index 159a324c6b..13eee3539e 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -168,11 +168,11 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
parseSectionHeader(dataStart + soff, &strtab);
m_stringTableFileOffset = strtab.offset;
- if ((quint32)(m_stringTableFileOffset + e_shentsize) >= fdlen || m_stringTableFileOffset == 0) {
+ if ((quint32)(strtab.offset + strtab.size) > fdlen || strtab.offset == 0) {
if (lib)
lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
.arg(library, QLibrary::tr("string table seems to be at %1")
- .arg(QString::number(soff, 16)));
+ .arg(QString::number(strtab.offset, 16)));
return Corrupt;
}