]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pe-binary: fix error reporting
authorLuca Boccassi <luca.boccassi@gmail.com>
Sat, 28 Mar 2026 18:35:09 +0000 (18:35 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 28 Mar 2026 19:56:31 +0000 (19:56 +0000)
This is a local calculation, errno is not set

Follow-up for a43427013949c6593629f551cf46e9cf9c167100

src/shared/pe-binary.c

index f342801bea220d012ed88bd169a77c9e2780003d..98b758dc4ebda23d4f1630122e8c0b8415f99778 100644 (file)
@@ -421,7 +421,7 @@ int pe_hash(int fd,
         if ((uint64_t) st.st_size > p) {
 
                 if ((uint64_t) st.st_size - p < le32toh(certificate_table->Size))
-                        return log_debug_errno(errno, "No space for certificate table, refusing.");
+                        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));
                 if (r < 0)