From: Colin Walters Date: Wed, 1 Oct 2008 17:49:48 +0000 (-0400) Subject: Bug 17803: Panic from dbus_signature_validate X-Git-Url: http://gitweb.freedesktop.org/?p=dbus/dbus.git;a=commitdiff;h=7b10b46c5c8658449783ce45f1273dd35c353bce Bug 17803: Panic from dbus_signature_validate * dbus/dbus-marshal-validate.c: Ensure we validate a basic type before calling is_basic on it. * dbus-marshal-validate-util.c: Test. --- --- a/dbus/dbus-marshal-validate-util.c +++ b/dbus/dbus-marshal-validate-util.c @@ -228,6 +228,7 @@ _dbus_marshal_validate_test (void) "123", ".", "(" + "a{(ii)i}" /* https://bugs.freedesktop.org/show_bug.cgi?id=17803 */ }; /* Signature with reason */ --- a/dbus/dbus-marshal-validate.c +++ b/dbus/dbus-marshal-validate.c @@ -247,6 +247,7 @@ _dbus_validate_signature_with_reason (co } if (last == DBUS_DICT_ENTRY_BEGIN_CHAR && + _dbus_type_is_valid (*p) && !dbus_type_is_basic (*p)) { result = DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE;