From: Simon McVittie Date: Wed, 11 Feb 2015 13:14:24 +0000 (+0000) Subject: bus_driver_handle_get_connection_credentials: do not assert on OOM X-Git-Tag: dbus-1.9.12~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e161ec72143d58aff1243d1d88f11907eed0becb;p=thirdparty%2Fdbus.git 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 --- diff --git a/bus/driver.c b/bus/driver.c index 83040669c..e82602bcf 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -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);