diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-03-13 14:28:33 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-03-13 17:15:34 +0000 |
commit | 3cabf99ba10405ba37bbd3ee3db6416b7efae394 (patch) | |
tree | 4aac644e0f6aac1de2a4cd37ac8cf375d29ffd70 /community/opensc | |
parent | da25cdc0b8d413c534352a6d7c22ae83093f79bc (diff) | |
download | aports-3cabf99ba10405ba37bbd3ee3db6416b7efae394.tar.bz2 aports-3cabf99ba10405ba37bbd3ee3db6416b7efae394.tar.xz |
community/opensc: fix overlapping memcpy
upstream report: https://github.com/OpenSC/OpenSC/issues/1631
Diffstat (limited to 'community/opensc')
-rw-r--r-- | community/opensc/APKBUILD | 9 | ||||
-rw-r--r-- | community/opensc/fix-overlapping-memcpy.patch | 12 |
2 files changed, 18 insertions, 3 deletions
diff --git a/community/opensc/APKBUILD b/community/opensc/APKBUILD index 62aac1e073..e092f15303 100644 --- a/community/opensc/APKBUILD +++ b/community/opensc/APKBUILD @@ -3,7 +3,7 @@ pkgname=opensc _realname=OpenSC pkgver=0.19.0 -pkgrel=0 +pkgrel=2 pkgdesc="Open source smart card tools and middleware" url="https://github.com/OpenSC/OpenSC" arch="all" @@ -13,7 +13,9 @@ depends_dev="zlib-dev pcsc-lite-dev openssl-dev readline-dev" makedepends="$depends_dev automake autoconf m4 gettext libtool" install="" subpackages="$pkgname-dev $pkgname-doc" -source="$_realname-${pkgver}.tar.gz::https://github.com/OpenSC/OpenSC/archive/${pkgver}.tar.gz" +source="$_realname-${pkgver}.tar.gz::https://github.com/OpenSC/OpenSC/archive/${pkgver}.tar.gz + fix-overlapping-memcpy.patch + " builddir="$srcdir/$_realname-$pkgver" @@ -59,4 +61,5 @@ package() { "$pkgdir/etc/opensc.conf" } -sha512sums="a54161b72e6ecea9d61d8bdf0fe0dbd0f97dd8fff0ce6ce344442d9dd9218779851054f8a9049c95c4276e69d3ab96afd0906ebb3278739c8f8e32ad3dbf2d4b OpenSC-0.19.0.tar.gz" +sha512sums="a54161b72e6ecea9d61d8bdf0fe0dbd0f97dd8fff0ce6ce344442d9dd9218779851054f8a9049c95c4276e69d3ab96afd0906ebb3278739c8f8e32ad3dbf2d4b OpenSC-0.19.0.tar.gz +db96b06131c9a49245d9b1f23acb37ca29e2826eeec44462435a90daf8a247d498f517a08350fb786d8b43ac6ba139f11e3a6fdb3424f529210ec7f087116135 fix-overlapping-memcpy.patch" diff --git a/community/opensc/fix-overlapping-memcpy.patch b/community/opensc/fix-overlapping-memcpy.patch new file mode 100644 index 0000000000..f6bb934d1f --- /dev/null +++ b/community/opensc/fix-overlapping-memcpy.patch @@ -0,0 +1,12 @@ +diff --git a/src/libopensc/card-gids.c b/src/libopensc/card-gids.c +index 2471c55a..27576f99 100644 +--- a/src/libopensc/card-gids.c ++++ b/src/libopensc/card-gids.c +@@ -1915,7 +1915,6 @@ static int gids_authenticate_admin(sc_card_t *card, u8* key) { + LOG_TEST_RET(card->ctx, r, "unable to set computer random"); + + // send it to the card +- memcpy(apduSetRandom+4, randomR1, 16); + sc_format_apdu(card, &apdu, SC_APDU_CASE_4, INS_GENERAL_AUTHENTICATE, 0x00, 0x00); + apdu.lc = sizeof(apduSetRandom); + apdu.data = apduSetRandom; |