diff --git a/opensc-0.20.0-idprime.patch b/opensc-0.20.0-idprime.patch new file mode 100644 index 0000000..7b9b346 --- /dev/null +++ b/opensc-0.20.0-idprime.patch @@ -0,0 +1,25 @@ +From 34dad7f543f006ad269ce1f935a9e8d3e3a83db7 Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Mon, 3 Feb 2020 16:40:51 +0100 +Subject: [PATCH] idprime: Add missing terminator in ATR list + +Thanks oss-fuzz + +https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20510 +--- + src/libopensc/card-idprime.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/libopensc/card-idprime.c b/src/libopensc/card-idprime.c +index 744d5189b9..9f5adde9d2 100644 +--- a/src/libopensc/card-idprime.c ++++ b/src/libopensc/card-idprime.c +@@ -52,6 +52,7 @@ static const struct sc_atr_table idprime_atrs[] = { + "ff:ff:00:ff:ff:ff:ff:ff:ff:ff:00:00:00:00:ff:ff:ff:ff:ff:ff", + "Gemalto IDPrime MD 8840, 3840, 3810, 840 and 830 Cards", + SC_CARD_TYPE_IDPRIME_GENERIC, 0, NULL }, ++ { NULL, NULL, NULL, 0, 0, NULL } + }; + + static const sc_path_t idprime_path = { + diff --git a/opensc.spec b/opensc.spec index e7a2759..62f25c5 100644 --- a/opensc.spec +++ b/opensc.spec @@ -32,6 +32,8 @@ Patch15: opensc-0.20.0-calloc0.patch # https://github.com/OpenSC/OpenSC/pull/2148 # + configuration change by default Patch16: opensc-0.20.0-file-cache.patch +# https://github.com/OpenSC/OpenSC/pull/1929 +Patch17: opensc-0.20.0-idprime.patch BuildRequires: pcsc-lite-devel @@ -71,6 +73,7 @@ every software/card that does so, too. %patch14 -p1 -b .padding %patch15 -p1 -b .calloc0 %patch16 -p1 -b .file-cache +%patch17 -p1 -b .idprime cp -p src/pkcs15init/README ./README.pkcs15init cp -p src/scconf/README.scconf .