summaryrefslogtreecommitdiff
path: root/dbus/dbus-marshal-recursive.h
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-12-06 13:49:56 +0000
committerSimon McVittie <smcv@collabora.com>2018-12-11 12:23:06 +0000
commit26d5d97d5b33e4da30fde21676ee212fef1c5ea3 (patch)
tree61c99dd80d003f0d52e69dc6a841c50845d348f8 /dbus/dbus-marshal-recursive.h
parentd9de6ab21319c848147c0c0891a01cf5f801b9a2 (diff)
downloaddbus-26d5d97d5b33e4da30fde21676ee212fef1c5ea3.tar.gz
Don't cast user-supplied pointers to DBusBasicValue *
If we cast a user-supplied pointer to DBusBasicValue *, that's like promising that the pointer is to an object at least as strictly aligned as a DBusBasicValue. In practice, it often isn't: for example, when we marshal a dbus_uint32_t, a pointer to it is only guaranteed to be 32-bit-aligned, whereas DBusBasicValue typically requires 64-bit alignment. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'dbus/dbus-marshal-recursive.h')
-rw-r--r--dbus/dbus-marshal-recursive.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus/dbus-marshal-recursive.h b/dbus/dbus-marshal-recursive.h
index c20bb913..c3b96819 100644
--- a/dbus/dbus-marshal-recursive.h
+++ b/dbus/dbus-marshal-recursive.h
@@ -119,7 +119,7 @@ void _dbus_type_reader_read_basic (const DBusTypeReader *
int _dbus_type_reader_get_array_length (const DBusTypeReader *reader);
DBUS_PRIVATE_EXPORT
void _dbus_type_reader_read_fixed_multi (const DBusTypeReader *reader,
- void *value,
+ const void **value,
int *n_elements);
void _dbus_type_reader_read_raw (const DBusTypeReader *reader,
const unsigned char **value_location);