[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-259-g037dea9

by NIIBE Yutaka cvs at cvs.gnupg.org
Mon Nov 11 08:46:41 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  037dea9dd5eac7a74df0e12cb437e71fb0732afa (commit)
      from  32989ad2b152d18198d718bc2c7232ce3e79c72f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 037dea9dd5eac7a74df0e12cb437e71fb0732afa
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Nov 11 16:41:43 2013 +0900

    scd: more pinpad fix.
    
    * scd/apdu.c (check_pcsc_pinpad): Set ->minlen and ->maxlen only when
    those are specified.
    (pcsc_pinpad_modify): Remove old check code.
    
    --
    
    GnuPG-bug-id: 1549

diff --git a/scd/apdu.c b/scd/apdu.c
index e0127d8..961c419 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -2177,8 +2177,11 @@ check_pcsc_pinpad (int slot, int command, pininfo_t *pininfo)
 {
   int r;
 
-  pininfo->minlen = reader_table[slot].pcsc.pinmin;
-  pininfo->maxlen = reader_table[slot].pcsc.pinmax;
+  if (reader_table[slot].pcsc.pinmin >= 0)
+    pininfo->minlen = reader_table[slot].pcsc.pinmin;
+
+  if (reader_table[slot].pcsc.pinmax >= 0)
+    pininfo->maxlen = reader_table[slot].pcsc.pinmax;
 
   if ((command == ISO7816_VERIFY && reader_table[slot].pcsc.verify_ioctl != 0)
       || (command == ISO7816_CHANGE_REFERENCE_DATA
@@ -2303,12 +2306,6 @@ pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
   if (!pininfo->maxlen)
     pininfo->maxlen = 15;
 
-  /* Note that the 25 is the maximum value the SPR532 allows.  */
-  if (pininfo->minlen < 1 || pininfo->minlen > 25
-      || pininfo->maxlen < 1 || pininfo->maxlen > 25
-      || pininfo->minlen > pininfo->maxlen)
-    return SW_HOST_INV_VALUE;
-
   pin_modify = xtrymalloc (len);
   if (!pin_modify)
     return SW_HOST_OUT_OF_CORE;

-----------------------------------------------------------------------

Summary of changes:
 scd/apdu.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list