From 0398e4ec1d0643663f9baf25ca9e9c6dd9377c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 12 Aug 2024 12:55:18 +0100 Subject: [PATCH] cid#1607030 silence Overflowed integer argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I90676cf47d7eef441cfabe5a77dfaf81986a1f89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171924 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sal/osl/unx/random.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sal/osl/unx/random.cxx b/sal/osl/unx/random.cxx index 743379818b57..35bc65911be4 100644 --- a/sal/osl/unx/random.cxx +++ b/sal/osl/unx/random.cxx @@ -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) {