Commit 0cc191f8 authored by Simon McVittie's avatar Simon McVittie

auth: Clear GUID from server if out of memory

If we retry processing the message in response to OOM, but we don't
clear this buffer first, then the assertion at the beginning will fail.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 0b887813
......@@ -1664,10 +1664,25 @@ process_ok(DBusAuth *auth,
_dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server));
if (auth->unix_fd_possible)
return send_negotiate_unix_fd(auth);
{
if (!send_negotiate_unix_fd (auth))
{
_dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0);
return FALSE;
}
return TRUE;
}
_dbus_verbose("Not negotiating unix fd passing, since not possible\n");
return send_begin (auth);
if (!send_begin (auth))
{
_dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0);
return FALSE;
}
return TRUE;
}
static dbus_bool_t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment