pe-binary: add explicit cast to silence coverity

Otherwise it gets confused about underflows (which are already checked)

CID#1645068

Follow-up for a434270139
This commit is contained in:
Luca Boccassi
2026-03-28 19:56:31 +00:00
parent 1a0fe20bc2
commit 74a9ed911d
+1 -1
View File
@@ -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;