diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-02 15:09:13 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-09-07 02:31:56 (GMT) |
commit | 37ab650b40623823c5e2b29a30ca7c2f2230f163 (patch) | |
tree | 9f20351b9cb0c1dd5d4795efb3662d3e6d039669 | |
parent | 47c0aad60d447fb53a23679128f70c562fd87fbd (diff) | |
download | Qt-37ab650b40623823c5e2b29a30ca7c2f2230f163.zip Qt-37ab650b40623823c5e2b29a30ca7c2f2230f163.tar.gz Qt-37ab650b40623823c5e2b29a30ca7c2f2230f163.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
(cherry picked from commit 4b7346a4bd30705ab5910d448ec56daa6568aa90)
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index e1b90b8..3e1276d 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() && |