qt5base-lts/tests/auto/dbus/qdbusmarshall
Sami Rosendahl b851c764a6 Fix stack overwrite in QDBusDemarshaller
QDBusArgument extraction operators and QDBusDemarshaller that implements
the extraction do not check the type of the extracted value.
Helper function template qIterGet in qdbusdemarshaller.cpp that is used
for extracting basic data types only reserves space from the stack for
the expected type as specified by client.
If the actual type in the DBus parameter is larger stack will be
overwritten in the helper function by at most 7 bytes (expected one byte,
received dbus_uint_64_t of size 8 bytes).

The fix always reserves space for the largest basic type dbus_uint64_t
readable by dbus_message_iter_get_basic API.

See also http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga41c23a05e552d0574d04

Task-number: QTBUG-22735
Change-Id: I9aa25b279852ac8acc40199a39910ea4002042d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-23 19:14:12 +01:00
..
qpong Moved dbus autotests into new directory structure 2011-09-01 09:37:08 +02:00
test all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
.gitignore Moved dbus autotests into new directory structure 2011-09-01 09:37:08 +02:00
common.h Remove unused code from qdbusmarshall test. 2011-11-02 00:53:26 +01:00
qdbusmarshall.pro all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
tst_qdbusmarshall.cpp Fix stack overwrite in QDBusDemarshaller 2011-11-23 19:14:12 +01:00