diff options
author | Havoc Pennington <hp@redhat.com> | 2005-01-28 03:06:56 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2005-01-28 03:06:56 +0000 |
commit | 3ed9db546e1143bc9aa2d83a6f423fdd81227352 (patch) | |
tree | 6ba7a785ddeff02224072cc51faf108482dfb0c7 /dbus/dbus-marshal-header.c | |
parent | 4506b6594b4a86557fad7850f56b5fdabd3108de (diff) |
2005-01-27 Havoc Pennington <hp@redhat.com>
* dbus/dbus-arch-deps.h.in: add 16/32-bit types
* configure.in: find the right type for 16 and 32 bit ints as well
as 64
* dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
the 16-bit types so people don't have to stuff them in 32-bit or
byte arrays.
Diffstat (limited to 'dbus/dbus-marshal-header.c')
-rw-r--r-- | dbus/dbus-marshal-header.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dbus/dbus-marshal-header.c b/dbus/dbus-marshal-header.c index b5a8d3d7..f32e7aa8 100644 --- a/dbus/dbus-marshal-header.c +++ b/dbus/dbus-marshal-header.c @@ -672,7 +672,7 @@ _dbus_header_have_message_untrusted (int max_message_length, dbus_uint32_t body_len_unsigned; _dbus_assert (start >= 0); - _dbus_assert (start < _DBUS_INT_MAX / 2); + _dbus_assert (start < _DBUS_INT32_MAX / 2); _dbus_assert (len >= 0); _dbus_assert (start == (int) _DBUS_ALIGN_VALUE (start, 8)); @@ -711,16 +711,16 @@ _dbus_header_have_message_untrusted (int max_message_length, /* overflow should be impossible since the lengths aren't allowed to * be huge. */ - _dbus_assert (max_message_length < _DBUS_INT_MAX / 2); + _dbus_assert (max_message_length < _DBUS_INT32_MAX / 2); if (body_len_unsigned + header_len_unsigned > (unsigned) max_message_length) { *validity = DBUS_INVALID_MESSAGE_TOO_LONG; return FALSE; } - _dbus_assert (body_len_unsigned < (unsigned) _DBUS_INT_MAX); - _dbus_assert (fields_array_len_unsigned < (unsigned) _DBUS_INT_MAX); - _dbus_assert (header_len_unsigned < (unsigned) _DBUS_INT_MAX); + _dbus_assert (body_len_unsigned < (unsigned) _DBUS_INT32_MAX); + _dbus_assert (fields_array_len_unsigned < (unsigned) _DBUS_INT32_MAX); + _dbus_assert (header_len_unsigned < (unsigned) _DBUS_INT32_MAX); *body_len = body_len_unsigned; *fields_array_len = fields_array_len_unsigned; |