From 96a47516321dea8c08e1ab15ac0102ce3c3ae3f1 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 6 Feb 2005 05:19:50 +0000 Subject: 2005-02-06 Havoc Pennington * dbus/dbus-message-factory.c (generate_special): more tests * dbus/dbus-marshal-validate.c (validate_body_helper): detect array length that exceeds the maximum --- dbus/dbus-marshal-basic.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dbus/dbus-marshal-basic.c') diff --git a/dbus/dbus-marshal-basic.c b/dbus/dbus-marshal-basic.c index 84a9ccaf..a443ea35 100644 --- a/dbus/dbus-marshal-basic.c +++ b/dbus/dbus-marshal-basic.c @@ -577,8 +577,8 @@ _dbus_marshal_read_basic (const DBusString *str, } break; default: - _dbus_warn ("type %s not a basic type\n", - _dbus_type_to_string (type)); + _dbus_warn ("type %s %d not a basic type\n", + _dbus_type_to_string (type), type); _dbus_assert_not_reached ("not a basic type"); break; } @@ -757,6 +757,9 @@ marshal_len_followed_by_bytes (int marshal_as, if (marshal_as == MARSHAL_AS_SIGNATURE) { + _dbus_assert (data_len <= DBUS_MAXIMUM_SIGNATURE_LENGTH); + _dbus_assert (data_len <= 255); /* same as max sig len right now */ + if (!_dbus_string_insert_byte (str, pos, data_len)) goto oom; -- cgit