diff --git a/0001-Fix-one-more-Wsign-compare-problem-I-missed.patch b/0001-Fix-one-more-Wsign-compare-problem-I-missed.patch new file mode 100644 index 0000000..6e17744 --- /dev/null +++ b/0001-Fix-one-more-Wsign-compare-problem-I-missed.patch @@ -0,0 +1,71 @@ +From ae2520e013caf4f5d0dae89623dc08925d6cd472 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Wed, 28 Oct 2015 15:58:07 -0400 +Subject: [PATCH] Fix one more -Wsign-compare problem I missed. + +Signed-off-by: Peter Jones +--- + src/daemon.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/daemon.c b/src/daemon.c +index 02b7352..175c874 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -194,7 +194,7 @@ malformed: + return; + } + n -= sizeof(tn->size); +- if (n < tn->size) ++ if ((size_t)n < tn->size) + goto malformed; + n -= tn->size; + +@@ -202,10 +202,10 @@ malformed: + goto malformed; + + pesignd_string *tp = pesignd_string_next(tn); +- if (n < (long long)sizeof(tp->size)) ++ if ((size_t)n < sizeof(tp->size)) + goto malformed; + n -= sizeof(tp->size); +- if (n < tp->size) ++ if ((size_t)n < tp->size) + goto malformed; + n -= tp->size; + +@@ -298,7 +298,7 @@ malformed: + return; + } + n -= sizeof(tn->size); +- if (n < tn->size) ++ if ((size_t)n < tn->size) + goto malformed; + n -= tn->size; + +@@ -487,7 +487,7 @@ malformed: + } + + n -= sizeof(tn->size); +- if (n < tn->size) ++ if ((size_t)n < tn->size) + goto malformed; + n -= tn->size; + +@@ -497,11 +497,11 @@ malformed: + if (!ctx->cms->tokenname) + goto oom; + +- if (n < (long long)sizeof(tn->size)) ++ if ((size_t)n < sizeof(tn->size)) + goto malformed; + pesignd_string *cn = pesignd_string_next(tn); + n -= sizeof(cn->size); +- if (n < cn->size) ++ if ((size_t)n < cn->size) + goto malformed; + + ctx->cms->certname = PORT_ArenaStrdup(ctx->cms->arena, +-- +2.5.0 + diff --git a/pesign.spec b/pesign.spec index 7751e48..3751a04 100644 --- a/pesign.spec +++ b/pesign.spec @@ -24,6 +24,7 @@ BuildRequires: rh-signing-tools >= 1.20-2 Source0: https://github.com/vathpela/pesign/releases/download/%{version}/pesign-%{version}.tar.bz2 Source1: certs.tar.xz +Patch0001: 0001-Fix-one-more-Wsign-compare-problem-I-missed.patch %description This package contains the pesign utility for signing UEFI binaries as