mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
dbus: Check method call signatures.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=45815
This commit is contained in:
parent
737a6180d4
commit
e9d82afdea
1 changed files with 7 additions and 2 deletions
|
|
@ -468,10 +468,15 @@ static enum find_result_t find_handler(struct call_info *call_info) {
|
|||
else if (!(call_info->iface_entry = pa_hashmap_get(call_info->obj_entry->interfaces, call_info->interface)))
|
||||
return NO_SUCH_INTERFACE;
|
||||
|
||||
else if ((call_info->method_handler = pa_hashmap_get(call_info->iface_entry->method_handlers, call_info->method)))
|
||||
else if ((call_info->method_handler = pa_hashmap_get(call_info->iface_entry->method_handlers, call_info->method))) {
|
||||
call_info->expected_method_sig = pa_hashmap_get(call_info->iface_entry->method_signatures, call_info->method);
|
||||
|
||||
if (!pa_streq(call_info->method_sig, call_info->expected_method_sig))
|
||||
return INVALID_METHOD_SIG;
|
||||
|
||||
return FOUND_METHOD;
|
||||
|
||||
else
|
||||
} else
|
||||
return NO_SUCH_METHOD;
|
||||
|
||||
} else { /* The method call doesn't contain an interface. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue