Commit 2e96b07e authored by Ralf Habacker's avatar Ralf Habacker

do_check_nonce: Fix of calling _dbus_string_append_len without checking return value (CID 54720).

Reported by Coverity: CID: Unchecked return value (CHECKED_RETURN)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent cc4c2d72
......@@ -74,7 +74,13 @@ do_check_nonce (int fd, const DBusString *nonce, DBusError *error)
}
else
{
_dbus_string_append_len(&buffer, _dbus_string_get_const_data (&p), n);
if (!_dbus_string_append_len (&buffer, _dbus_string_get_const_data (&p), n))
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
_dbus_string_free (&p);
_dbus_string_free (&buffer);
return FALSE;
}
nleft -= n;
}
}
......
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