mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-20 02:30:39 +02:00
2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
* dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): fix a bug with CUSTOM types. * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add a unit test for this bug (used to fail).
This commit is contained in:
parent
520bdf704d
commit
24ffe79c80
3 changed files with 17 additions and 1 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
|
||||
|
||||
* dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
|
||||
fix a bug with CUSTOM types.
|
||||
|
||||
* dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
|
||||
a unit test for this bug (used to fail).
|
||||
|
||||
2004-03-12 Mikael Hallendal <micke@imendio.com>
|
||||
|
||||
* bus/activation.c:
|
||||
|
|
|
|||
|
|
@ -1649,7 +1649,7 @@ _dbus_marshal_get_arg_end_pos (const DBusString *str,
|
|||
/* Demarshal the string length */
|
||||
len = _dbus_demarshal_uint32 (str, byte_order, pos, &pos);
|
||||
|
||||
*end_pos = pos + len + 1;
|
||||
pos += len + 1;
|
||||
|
||||
/* Demarshal the data length */
|
||||
len = _dbus_demarshal_uint32 (str, byte_order, pos, &pos);
|
||||
|
|
|
|||
|
|
@ -6003,6 +6003,12 @@ message_iter_test (DBusMessage *message)
|
|||
dbus_free (str);
|
||||
dbus_free (data);
|
||||
|
||||
if (!dbus_message_iter_next (&iter))
|
||||
_dbus_assert_not_reached ("Reached end of arguments");
|
||||
|
||||
if (dbus_message_iter_get_byte (&iter) != 0xF0)
|
||||
_dbus_assert_not_reached ("wrong value after custom");
|
||||
|
||||
if (dbus_message_iter_next (&iter))
|
||||
_dbus_assert_not_reached ("Didn't reach end of arguments");
|
||||
}
|
||||
|
|
@ -7140,6 +7146,8 @@ _dbus_message_test (const char *test_data_dir)
|
|||
dbus_message_iter_append_custom (&iter, "MyTypeName",
|
||||
"data", 5);
|
||||
|
||||
dbus_message_iter_append_byte (&iter, 0xF0);
|
||||
|
||||
message_iter_test (message);
|
||||
|
||||
/* Message loader test */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue