From 131a511194935554357972c99c325c7202077560 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 7 Jan 2014 10:55:49 +0200 Subject: 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 --- src/corelib/plugin/qlibrary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3