From 8a5267e4d96438aa74672ca1bf25d187c6c45bd2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 2 Jul 2018 22:38:57 -0700 Subject: Plugins: fix crash if the binary JSON data contains invalid size Eight bytes into the Binary JSON header there's a 32-bit little-endian size, which qJsonFromRawLibraryMetaData uses to determine the size of the stored metadata. That value is passed as a size to QByteArray, which means certain values could cause crashes due to being too big or via sign-extension in 64-bit. [ChangeLog][QtCore][QPluginLoader] Fixed an issue that could cause a crash when certain damaged or corrupt plugin files were scanned. Change-Id: I117816bf0f5e469b8d34fffd153dc5425cec39a7 Reviewed-by: Simon Hausmann --- tests/auto/corelib/plugin/qplugin/qplugin.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/plugin/qplugin/qplugin.pro') diff --git a/tests/auto/corelib/plugin/qplugin/qplugin.pro b/tests/auto/corelib/plugin/qplugin/qplugin.pro index 5283c2d52b..96fc704c07 100644 --- a/tests/auto/corelib/plugin/qplugin/qplugin.pro +++ b/tests/auto/corelib/plugin/qplugin/qplugin.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -TESTPLUGINS = +TESTPLUGINS = invalidplugin win32 { contains(QT_CONFIG, debug): TESTPLUGINS += debugplugin @@ -8,7 +8,7 @@ win32 { CONFIG(debug, debug|release): TESTPLUGINS += debugplugin CONFIG(release, debug|release): TESTPLUGINS += releaseplugin } else { - TESTPLUGINS = debugplugin releaseplugin + TESTPLUGINS += debugplugin releaseplugin } SUBDIRS += main $$TESTPLUGINS -- cgit v1.2.3