Commit 9e864c2e authored by Philip Withnall's avatar Philip Withnall Committed by Simon McVittie

test: Fix reading off the end of an array in test-corrupt

One level of pointer indirection too many when passing the arguments to
dbus_message_append_args().

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100568Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
Reviewed-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent d7ff4e5b
...@@ -271,7 +271,6 @@ test_byte_order (Fixture *f, ...@@ -271,7 +271,6 @@ test_byte_order (Fixture *f,
int fd; int fd;
char *blob; char *blob;
const gchar *arg = not_a_dbus_message; const gchar *arg = not_a_dbus_message;
const gchar * const *args = &arg;
int blob_len; int blob_len;
DBusMessage *message; DBusMessage *message;
dbus_bool_t mem; dbus_bool_t mem;
...@@ -283,7 +282,7 @@ test_byte_order (Fixture *f, ...@@ -283,7 +282,7 @@ test_byte_order (Fixture *f,
/* Append 0xFF bytes, so that the length of the body when byte-swapped /* Append 0xFF bytes, so that the length of the body when byte-swapped
* is 0xFF000000, which is invalid */ * is 0xFF000000, which is invalid */
mem = dbus_message_append_args (message, mem = dbus_message_append_args (message,
DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &args, 0xFF, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &arg, 0xFF,
DBUS_TYPE_INVALID); DBUS_TYPE_INVALID);
g_assert (mem); g_assert (mem);
mem = dbus_message_marshal (message, &blob, &blob_len); mem = dbus_message_marshal (message, &blob, &blob_len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment