From d5999b66a241857bb7304b9ffd07572f01eb4f38 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 7 Oct 2026 13:35:38 +0200 Subject: [PATCH] sbsign: name the input file when hashing it fails verb_sign() logs argv[0], which is the verb, as the name of the file it could not hash. Log argv[1], the input file. (cherry picked from commit 9030bbfc90c646b7c07bbe8d70cfe7ba40b5a25a) --- src/sbsign/sbsign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbsign/sbsign.c b/src/sbsign/sbsign.c index f5c6b96b68..b3e57e8ea4 100644 --- a/src/sbsign/sbsign.c +++ b/src/sbsign/sbsign.c @@ -481,7 +481,7 @@ static int verb_sign(int argc, char *argv[], uintptr_t _data, void *userdata) { size_t pehashsz; r = pe_hash(srcfd, sym_EVP_sha256(), &pehash, &pehashsz); if (r < 0) - return log_error_errno(r, "Failed to hash PE binary %s: %m", argv[0]); + return log_error_errno(r, "Failed to hash PE binary %s: %m", argv[1]); _cleanup_free_ uint8_t *idcraw = NULL; size_t idcrawsz = 0; /* avoid false maybe-uninitialized warning */