mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 06:28:00 +02:00
bus_driver_handle_get_connection_credentials: do not assert on OOM
dbus_connection_get_windows_user is documented to return TRUE but put NULL in its argument if OOM is reached. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89041 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
parent
e387331220
commit
e161ec7214
1 changed files with 4 additions and 0 deletions
|
|
@ -1686,6 +1686,10 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection,
|
|||
{
|
||||
DBusString str;
|
||||
dbus_bool_t result;
|
||||
|
||||
if (windows_sid == NULL)
|
||||
goto oom;
|
||||
|
||||
_dbus_string_init_const (&str, windows_sid);
|
||||
result = _dbus_validate_utf8 (&str, 0, _dbus_string_get_length (&str));
|
||||
_dbus_string_free (&str);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue