cid#1607030 silence Overflowed integer argument

Change-Id: I90676cf47d7eef441cfabe5a77dfaf81986a1f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171924
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-08-12 12:55:18 +01:00
parent 06aaed0fd7
commit 0398e4ec1d

View file

@ -31,7 +31,7 @@ bool osl_get_system_random_data(char* buffer, size_t desired_len)
while (desired_len)
{
ssize_t nb_read;
if ((nb_read = read(fd, buffer, desired_len)) == -1)
if ((nb_read = read(fd, buffer, desired_len)) < 0)
{
if (errno != EINTR)
{