From f656f4a7f16aa0093d84df3f25c8e2ef371d379e Mon Sep 17 00:00:00 2001 From: Veronika Hanulikova Date: Mon, 21 Feb 2022 14:12:22 +0100 Subject: [PATCH] Initialize variables --- opensc-0.22.0-init-var.patch | 27 +++++++++++++++++++++++++++ opensc.spec | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 opensc-0.22.0-init-var.patch diff --git a/opensc-0.22.0-init-var.patch b/opensc-0.22.0-init-var.patch new file mode 100644 index 0000000..d86a076 --- /dev/null +++ b/opensc-0.22.0-init-var.patch @@ -0,0 +1,27 @@ +From bd8269ed0afd24da2fc0c5350640f66f0641d4d4 Mon Sep 17 00:00:00 2001 +From: Veronika Hanulikova +Date: Mon, 21 Feb 2022 14:02:32 +0100 +Subject: [PATCH] base64: Initialize variables + +--- + src/libopensc/base64.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/libopensc/base64.c b/src/libopensc/base64.c +index 4fe79897..1aa1c941 100644 +--- a/src/libopensc/base64.c ++++ b/src/libopensc/base64.c +@@ -150,8 +150,8 @@ int sc_base64_encode(const u8 *in, size_t len, u8 *out, size_t outlen, size_t li + + int sc_base64_decode(const char *in, u8 *out, size_t outlen) + { +- int len = 0, r, skip; +- unsigned int i; ++ int len = 0, r = 0, skip = 0; ++ unsigned int i = 0; + + while ((r = from_base64(in, &i, &skip)) > 0) { + int finished = 0, s = 16; +-- +2.27.0 + diff --git a/opensc.spec b/opensc.spec index ef77cbb..878fc50 100644 --- a/opensc.spec +++ b/opensc.spec @@ -20,6 +20,7 @@ Patch8: %{name}-%{version}-file-cache.patch Patch9: %{name}-%{version}-detect-empty.patch # https://github.com/OpenSC/OpenSC/pull/2512 (#2046792) Patch10: %{name}-%{version}-realloc-pointer.patch +Patch11: %{name}-%{version}-init-var.patch BuildRequires: make BuildRequires: pcsc-lite-devel @@ -62,6 +63,7 @@ every software/card that does so, too. %patch8 -p1 -b .file-cache %patch9 -p1 -b .detect-empty %patch10 -p1 -b .realloc-pointer +%patch11 -p1 -b .init-var # The test-pkcs11-tool-allowed-mechanisms already works in Fedora sed -i -e '/XFAIL_TESTS/,$ {