From 74a9ed911d878cffbdf9cb1d3c88088fae41aaaa Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 28 Mar 2026 18:45:52 +0000 Subject: [PATCH] pe-binary: add explicit cast to silence coverity Otherwise it gets confused about underflows (which are already checked) CID#1645068 Follow-up for a43427013949c6593629f551cf46e9cf9c167100 --- src/shared/pe-binary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/pe-binary.c b/src/shared/pe-binary.c index 98b758dc4e..da54428306 100644 --- a/src/shared/pe-binary.c +++ b/src/shared/pe-binary.c @@ -423,7 +423,7 @@ int pe_hash(int fd, if ((uint64_t) st.st_size - p < le32toh(certificate_table->Size)) return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), "No space for certificate table, refusing."); - r = hash_file(fd, mdctx, p, st.st_size - p - le32toh(certificate_table->Size)); + r = hash_file(fd, mdctx, p, (uint64_t) st.st_size - p - le32toh(certificate_table->Size)); if (r < 0) return r;