mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-25 05:00:42 +02:00
bus_driver_handle_become_monitor: Don't leak zero-length array of rules
Only privileged users can trigger this leak, so it is not a denial of service attack. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
c018e0b1b2
commit
5accf42aab
1 changed files with 1 additions and 0 deletions
|
|
@ -2258,6 +2258,7 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
|
|||
/* Special case: a zero-length array becomes [""] */
|
||||
if (n_match_rules == 0)
|
||||
{
|
||||
dbus_free (match_rules);
|
||||
match_rules = dbus_malloc (2 * sizeof (char *));
|
||||
|
||||
if (match_rules == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue