summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-09-02 15:09:13 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-09-02 15:10:36 (GMT)
commit4b7346a4bd30705ab5910d448ec56daa6568aa90 (patch)
tree292f79d467fcd4ef92f6efbb4428c0c6989cab4b /src
parent71a3b1a0d3ee6429832bdbf0da026cdc3f74080f (diff)
downloadQt-4b7346a4bd30705ab5910d448ec56daa6568aa90.zip
Qt-4b7346a4bd30705ab5910d448ec56daa6568aa90.tar.gz
Qt-4b7346a4bd30705ab5910d448ec56daa6568aa90.tar.bz2
Fix remote crash in delivering D-Bus calls with too few arguments
Patch by Christoph Feck. Task-number: QTBUG-13348 Reviewed by me
Diffstat (limited to 'src')
-rw-r--r--src/dbus/qdbusintegrator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 7951177..3833874 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -714,6 +714,9 @@ QDBusCallDeliveryEvent* QDBusConnectionPrivate::prepareReply(QDBusConnectionPriv
if (metaTypes[n] == QDBusMetaTypeId::message)
--n;
+ if (msg.arguments().count() < n)
+ return 0; // too few arguments
+
// check that types match
for (int i = 0; i < n; ++i)
if (metaTypes.at(i + 1) != msg.arguments().at(i).userType() &&