mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-01 05:50:12 +01:00
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=90021 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
cc4c2d72bc
commit
2e96b07e94
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue