From 4b7346a4bd30705ab5910d448ec56daa6568aa90 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 2 Sep 2010 17:09:13 +0200 Subject: Fix remote crash in delivering D-Bus calls with too few arguments Patch by Christoph Feck. Task-number: QTBUG-13348 Reviewed by me --- src/dbus/qdbusintegrator.cpp | 3 +++ 1 file changed, 3 insertions(+) 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() && -- cgit v0.12