Questionable / Incorrect Code

NIIBE Yutaka gniibe at fsij.org
Wed Jan 7 00:36:46 CET 2015


On 12/25/2014 04:53 PM, NIIBE Yutaka wrote:
> I had pinpad related enhancement branch and Marcus had npth
> related branch.  I think that I pushed first, and Marcus had to merge,
> and introduced this bug unfortunately.

It's pushed, as it's obvious fix and double-checked by me of 2014 and
me of 2015.

It is same entity, you'd say.  I wish I am different in 2015 somehow,
_and_ I will be as same.

Sounds Zen-ish?  Well, it's in our daily life.

Here, we will have Dhama Doll Market this week [0].  You can see the
dolls of the founder of the Zen in the picture.

[0] http://www.maebashi-cvb.com/english/events/06.htm


commit 602f17b5a775f02e0e33a54d3155929dc00e4f53
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Jan 7 08:15:12 2015 +0900

    scd: fix merge failure.

    * scd/apdu.c (pcsc_pinpad_verify): Remove wrong lines inserted by
    merge.

    --

    Thanks to Joshua Rogers for reviewing and reporting.

diff --git a/scd/apdu.c b/scd/apdu.c
index 476723a..4ec6b4d 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -2336,8 +2336,6 @@ pcsc_pinpad_verify (int slot, int class, int ins, int p0, int p1,
                      pin_verify, len, result, &resultlen);
   xfree (pin_verify);
   if (sw || resultlen < 2)
-    return sw? sw : SW_HOST_INCOMPLETE_CARD_RESPONSE;
-  sw = (result[resultlen-2] << 8) | result[resultlen-1];
     {
       log_error ("control_pcsc failed: %d\n", sw);
       return sw? sw: SW_HOST_INCOMPLETE_CARD_RESPONSE;
--



More information about the Gnupg-devel mailing list