diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-02 15:09:13 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-02 15:10:36 (GMT) |
commit | 4b7346a4bd30705ab5910d448ec56daa6568aa90 (patch) | |
tree | 292f79d467fcd4ef92f6efbb4428c0c6989cab4b /src | |
parent | 71a3b1a0d3ee6429832bdbf0da026cdc3f74080f (diff) | |
download | Qt-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.cpp | 3 |
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() && |