Line 0
Link Here
|
|
|
1 |
From c555fd74c009242c3864576bd5f17a1f8f4fdffd Mon Sep 17 00:00:00 2001 |
2 |
From: Peter Jones <pjones@redhat.com> |
3 |
Date: Tue, 18 Feb 2020 16:28:56 -0500 |
4 |
Subject: [PATCH] pesigcheck: Fix a wrong assignment |
5 |
|
6 |
gcc says: |
7 |
|
8 |
pesigcheck.c: In function 'check_signature': |
9 |
pesigcheck.c:321:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion] |
10 |
321 | reason->type = siBuffer; |
11 |
| ^ |
12 |
pesigcheck.c:333:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion] |
13 |
333 | reason->type = siBuffer; |
14 |
| ^ |
15 |
cc1: all warnings being treated as errors |
16 |
|
17 |
And indeed, that line of code makes no sense at all - it was supposed to |
18 |
be reason->sig.type. |
19 |
|
20 |
Signed-off-by: Peter Jones <pjones@redhat.com> |
21 |
--- |
22 |
src/pesigcheck.c | 4 ++-- |
23 |
1 file changed, 2 insertions(+), 2 deletions(-) |
24 |
|
25 |
diff --git a/src/pesigcheck.c b/src/pesigcheck.c |
26 |
index 524cce3..8fa0f1a 100644 |
27 |
--- a/src/pesigcheck.c |
28 |
+++ b/src/pesigcheck.c |
29 |
@@ -318,7 +318,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons, |
30 |
reason->type = SIGNATURE; |
31 |
reason->sig.data = data; |
32 |
reason->sig.len = datalen; |
33 |
- reason->type = siBuffer; |
34 |
+ reason->sig.type = siBuffer; |
35 |
nreason += 1; |
36 |
is_invalid = true; |
37 |
} |
38 |
@@ -330,7 +330,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons, |
39 |
reason->type = SIGNATURE; |
40 |
reason->sig.data = data; |
41 |
reason->sig.len = datalen; |
42 |
- reason->type = siBuffer; |
43 |
+ reason->sig.type = siBuffer; |
44 |
nreason += 1; |
45 |
has_valid_cert = true; |
46 |
} |