91f29681d8
- fix the signature size check while importing a signature - Amend the spec file with spec-cleaner OBS-URL: https://build.opensuse.org/request/show/263190 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign?expand=0&rev=31
31 lines
875 B
Diff
31 lines
875 B
Diff
From b5f822be1da9c8e4f6e04286b4b7ab73165478ab Mon Sep 17 00:00:00 2001
|
|
From: Gary Ching-Pang Lin <glin@suse.com>
|
|
Date: Tue, 25 Nov 2014 15:28:40 +0800
|
|
Subject: [PATCH] Correct the signature size check
|
|
|
|
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
|
|
---
|
|
src/actions.c | 5 ++---
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/actions.c b/src/actions.c
|
|
index 74a34e3..44c9675 100644
|
|
--- a/src/actions.c
|
|
+++ b/src/actions.c
|
|
@@ -416,10 +416,9 @@ check_signature_space(pesign_context *ctx)
|
|
ssize_t available = available_cert_space(ctx->outpe);
|
|
ssize_t target = ctx->cms_ctx->newsig.len + sizeof (win_certificate);
|
|
|
|
- if (available == target)
|
|
- return;
|
|
+ target += ALIGNMENT_PADDING(target, 8);
|
|
|
|
- if (target + 8 > available)
|
|
+ if (available >= target)
|
|
return;
|
|
|
|
fprintf(stderr, "Could not add new signature: insufficient space.\n");
|
|
--
|
|
2.1.2
|
|
|