1 From bcb39d6f4d2dee6beb035cb2f3618174ec1cb2b0 Mon Sep 17 00:00:00 2001
3 Date: Fri, 10 Dec 2021 13:54:26 +0200
4 Subject: [PATCH] Fix maybe uninitialized errors
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
10 Upstream: https://github.com/OpenSC/OpenSC/commit/05ec8c7fe785a2b9aeaac1164adb349df42b7f80
12 src/libopensc/pkcs15-coolkey.c | 12 ++++++------
13 src/pkcs15init/pkcs15-asepcos.c | 2 +-
14 src/tools/opensc-explorer.c | 2 +-
15 3 files changed, 8 insertions(+), 8 deletions(-)
17 diff --git a/src/libopensc/pkcs15-coolkey.c b/src/libopensc/pkcs15-coolkey.c
18 index 586475dd..15684cef 100644
19 --- a/src/libopensc/pkcs15-coolkey.c
20 +++ b/src/libopensc/pkcs15-coolkey.c
21 @@ -147,9 +147,9 @@ coolkey_find_matching_cert(sc_card_t *card, sc_cardctl_coolkey_object_t *in_obj,
23 coolkey_get_attribute_ulong(sc_card_t *card, sc_cardctl_coolkey_object_t *obj, CK_ATTRIBUTE_TYPE type, CK_ULONG *value)
28 + const u8 *val = NULL;
33 r = coolkey_get_attribute(card, obj, type, &val, &val_len, &data_type);
34 @@ -168,8 +168,8 @@ static int
35 coolkey_get_attribute_boolean(sc_card_t *card, sc_cardctl_coolkey_object_t *obj, CK_ATTRIBUTE_TYPE attr_type)
40 + const u8 *val = NULL;
43 r = coolkey_get_attribute(card, obj, attr_type, &val, &val_len, NULL);
45 @@ -186,7 +186,7 @@ static int
46 coolkey_get_attribute_bytes(sc_card_t *card, sc_cardctl_coolkey_object_t *obj, CK_ATTRIBUTE_TYPE type, u8 *data, size_t *data_len, size_t max_data_len)
53 r = coolkey_get_attribute(card, obj, type, &val, &val_len, NULL);
54 diff --git a/src/pkcs15init/pkcs15-asepcos.c b/src/pkcs15init/pkcs15-asepcos.c
55 index d7122012..bc0efb5c 100644
56 --- a/src/pkcs15init/pkcs15-asepcos.c
57 +++ b/src/pkcs15init/pkcs15-asepcos.c
58 @@ -221,7 +221,7 @@ static int asepcos_do_store_pin(sc_profile_t *profile, sc_card_t *card,
60 sc_file_t *nfile = NULL;
61 u8 buf[64], sbuf[64], *p = buf, *q = sbuf;
65 if (auth_info->auth_type != SC_PKCS15_PIN_AUTH_TYPE_PIN)
66 return SC_ERROR_OBJECT_NOT_VALID;
67 diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c
68 index 9ec4daa1..04efdf8f 100644
69 --- a/src/tools/opensc-explorer.c
70 +++ b/src/tools/opensc-explorer.c
71 @@ -2472,7 +2472,7 @@ int main(int argc, char *argv[])
78 char prompt[3*SC_MAX_PATH_STRING_SIZE];