e087d2f
From c555fd74c009242c3864576bd5f17a1f8f4fdffd Mon Sep 17 00:00:00 2001
e087d2f
From: Peter Jones <pjones@redhat.com>
e087d2f
Date: Tue, 18 Feb 2020 16:28:56 -0500
e087d2f
Subject: [PATCH] pesigcheck: Fix a wrong assignment
e087d2f
e087d2f
gcc says:
e087d2f
e087d2f
  pesigcheck.c: In function 'check_signature':
e087d2f
  pesigcheck.c:321:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion]
e087d2f
  321 |    reason->type = siBuffer;
e087d2f
      |                 ^
e087d2f
  pesigcheck.c:333:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion]
e087d2f
  333 |    reason->type = siBuffer;
e087d2f
      |                 ^
e087d2f
  cc1: all warnings being treated as errors
e087d2f
e087d2f
And indeed, that line of code makes no sense at all - it was supposed to
e087d2f
be reason->sig.type.
e087d2f
e087d2f
Signed-off-by: Peter Jones <pjones@redhat.com>
e087d2f
---
e087d2f
 src/pesigcheck.c | 4 ++--
e087d2f
 1 file changed, 2 insertions(+), 2 deletions(-)
e087d2f
e087d2f
diff --git a/src/pesigcheck.c b/src/pesigcheck.c
e087d2f
index 524cce307bf..8fa0f1ad03d 100644
e087d2f
--- a/src/pesigcheck.c
e087d2f
+++ b/src/pesigcheck.c
e087d2f
@@ -318,7 +318,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons,
e087d2f
 			reason->type = SIGNATURE;
e087d2f
 			reason->sig.data = data;
e087d2f
 			reason->sig.len = datalen;
e087d2f
-			reason->type = siBuffer;
e087d2f
+			reason->sig.type = siBuffer;
e087d2f
 			nreason += 1;
e087d2f
 			is_invalid = true;
e087d2f
 		}
e087d2f
@@ -330,7 +330,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons,
e087d2f
 			reason->type = SIGNATURE;
e087d2f
 			reason->sig.data = data;
e087d2f
 			reason->sig.len = datalen;
e087d2f
-			reason->type = siBuffer;
e087d2f
+			reason->sig.type = siBuffer;
e087d2f
 			nreason += 1;
e087d2f
 			has_valid_cert = true;
e087d2f
 		}
e087d2f
-- 
e087d2f
2.24.1
e087d2f