summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-01-07 10:55:49 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-09 12:28:46 +0100
commit131a511194935554357972c99c325c7202077560 (patch)
tree1339bfd25127ff0631ec36aba4de3ee663f635d8 /src
parentf0f6c1d0edd8c71530b8e47b61d70aa55a0c6a0c (diff)
Ensure that the Qt5Core library does not contain "QTMETADATA ".
In the event the plugin loader encounters it due to some configuration problem, it is otherwise detected as a plugin causing a crash when trying to read the meta data. Task-number: QTBUG-35970 Change-Id: I34182b3a61125e3b192dfd4b1dc03bd1e98c693e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/plugin/qlibrary.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 77de4d594e..468f759189 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -256,7 +256,8 @@ static bool findPatternUnloaded(const QString &library, QLibraryPrivate *lib)
*/
bool hasMetaData = false;
long pos = 0;
- const char pattern[] = "QTMETADATA ";
+ char pattern[] = "qTMETADATA ";
+ pattern[0] = 'Q'; // Ensure the pattern "QTMETADATA" is not found in this library should QPluginLoader ever encounter it.
const ulong plen = qstrlen(pattern);
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
int r = QElfParser().parse(filedata, fdlen, library, lib, &pos, &fdlen);