mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-19 20:10:31 +01:00
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.
This commit is contained in:
parent
008bca5a4e
commit
f2922ce4bc
2 changed files with 2 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -247,6 +247,7 @@ _dbus_validate_signature_with_reason (const DBusString *type_str,
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue