1 |
commit: a679c00ae4fb19f6b3ae2614fca30f2a1d2548d8 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 16 19:11:38 2018 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 16 19:45:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a679c00a |
7 |
|
8 |
dev-libs/opensc: fix uninitialized use |
9 |
|
10 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
11 |
|
12 |
dev-libs/opensc/files/opensc-0.18.0-build.patch | 34 +++++++++++++++++++++++++ |
13 |
1 file changed, 34 insertions(+) |
14 |
|
15 |
diff --git a/dev-libs/opensc/files/opensc-0.18.0-build.patch b/dev-libs/opensc/files/opensc-0.18.0-build.patch |
16 |
index 2bea2e53d59..342abd83eb0 100644 |
17 |
--- a/dev-libs/opensc/files/opensc-0.18.0-build.patch |
18 |
+++ b/dev-libs/opensc/files/opensc-0.18.0-build.patch |
19 |
@@ -30,3 +30,37 @@ index e2af52b9..a609f612 100644 |
20 |
-- |
21 |
2.16.1 |
22 |
|
23 |
+From a6b4605b863d45978ebd681c4bbaa3aaf0ab90e7 Mon Sep 17 00:00:00 2001 |
24 |
+From: Gianfranco Costamagna <costamagnagianfranco@×××××.it> |
25 |
+Date: Tue, 10 Jul 2018 14:49:42 +0200 |
26 |
+Subject: [PATCH] card-piv.c: initialize variable to fix a ppc64el build |
27 |
+ failure |
28 |
+MIME-Version: 1.0 |
29 |
+Content-Type: text/plain; charset=UTF-8 |
30 |
+Content-Transfer-Encoding: 8bit |
31 |
+ |
32 |
+This fixes a build failure with optimized ppc64el and new gcc builds |
33 |
+card-piv.c: In function ‘piv_validate_general_authentication.isra.3’: |
34 |
+card-piv.c:2390:9: error: ‘rbuflen’ may be used uninitialized in this function [-Werror=maybe-uninitialized] |
35 |
+ body = sc_asn1_find_tag(card->ctx, rbuf, rbuflen, 0x7c, &bodylen); |
36 |
+ ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
37 |
+--- |
38 |
+ src/libopensc/card-piv.c | 2 +- |
39 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
40 |
+ |
41 |
+diff --git a/src/libopensc/card-piv.c b/src/libopensc/card-piv.c |
42 |
+index e85dfc45..13b0cc21 100644 |
43 |
+--- a/src/libopensc/card-piv.c |
44 |
++++ b/src/libopensc/card-piv.c |
45 |
+@@ -2334,7 +2334,7 @@ static int piv_validate_general_authentication(sc_card_t *card, |
46 |
+ |
47 |
+ u8 sbuf[4096]; /* needs work. for 3072 keys, needs 384+10 or so */ |
48 |
+ u8 *rbuf = NULL; |
49 |
+- size_t rbuflen; |
50 |
++ size_t rbuflen = 0; |
51 |
+ |
52 |
+ SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); |
53 |
+ |
54 |
+-- |
55 |
+2.16.4 |
56 |
+ |