From 3ed9db546e1143bc9aa2d83a6f423fdd81227352 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 28 Jan 2005 03:06:56 +0000 Subject: 2005-01-27 Havoc Pennington * 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. --- dbus/dbus-marshal-validate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dbus/dbus-marshal-validate.c') diff --git a/dbus/dbus-marshal-validate.c b/dbus/dbus-marshal-validate.c index f15d2811..b26adb2c 100644 --- a/dbus/dbus-marshal-validate.c +++ b/dbus/dbus-marshal-validate.c @@ -57,7 +57,7 @@ _dbus_validate_signature_with_reason (const DBusString *type_str, int array_depth; _dbus_assert (type_str != NULL); - _dbus_assert (type_pos < _DBUS_INT_MAX - len); + _dbus_assert (type_pos < _DBUS_INT32_MAX - len); _dbus_assert (len >= 0); _dbus_assert (type_pos >= 0); @@ -76,6 +76,8 @@ _dbus_validate_signature_with_reason (const DBusString *type_str, { case DBUS_TYPE_BYTE: case DBUS_TYPE_BOOLEAN: + case DBUS_TYPE_INT16: + case DBUS_TYPE_UINT16: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: case DBUS_TYPE_INT64: @@ -159,8 +161,10 @@ validate_body_helper (DBusTypeReader *reader, case DBUS_TYPE_BYTE: ++p; break; - + case DBUS_TYPE_BOOLEAN: + case DBUS_TYPE_INT16: + case DBUS_TYPE_UINT16: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: case DBUS_TYPE_INT64: -- cgit