Hi!

I introduced a regression in 2.1.2 which may lead to a non working
pinpad reader.  If you experience problems, please try the attached
patch.


Salam-Shalom,

   Werner


-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
>From 07a71da479daaac43b8c5b1034a1e66f96bdbc48 Mon Sep 17 00:00:00 2001
From: Werner Koch <w...@gnupg.org>
Date: Thu, 12 Feb 2015 20:40:39 +0100
Subject: [PATCH] scd: Fix regression in 2.1.2 (due to commit 2183683)

* scd/apdu.c (pcsc_vendor_specific_init): Replace use of
bufNN_to_uint by direct code.
--

Hey, that was little endian.
---
 scd/apdu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scd/apdu.c b/scd/apdu.c
index e5db4f0..5e7d27b 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -1851,9 +1851,9 @@ pcsc_vendor_specific_init (int slot)
       if (l == 1)
         v = p[0];
       else if (l == 2)
-        v = buf16_to_uint (p);
+        v = (((unsigned int)p[1] << 8) | p[0]);
       else if (l == 4)
-        v = buf32_to_uint (p);
+        v = (((unsigned int)p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]);
 
       if (tag == PCSCv2_PART10_PROPERTY_bMinPINSize)
         reader_table[slot].pcsc.pinmin = v;
-- 
2.1.4

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to