summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-11 13:14:24 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2015-02-11 16:26:16 +0100
commite161ec72143d58aff1243d1d88f11907eed0becb (patch)
tree22ceaf360f82207cd333867458162a81b8d66b99 /bus
parente38733122084655738d109228b4df271262fac42 (diff)
downloaddbus-e161ec72143d58aff1243d1d88f11907eed0becb.tar.gz
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>
Diffstat (limited to 'bus')
-rw-r--r--bus/driver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bus/driver.c b/bus/driver.c
index 83040669..e82602bc 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);