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:
Simon McVittie 2015-02-11 13:14:24 +00:00 committed by Ralf Habacker
parent e387331220
commit e161ec7214

View file

@ -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);