agent: fix agent_askpin.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 9 Oct 2015 02:46:23 +0000 (11:46 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 9 Oct 2015 02:46:23 +0000 (11:46 +0900)
* agent/call-pinentry.c (agent_askpin): Fix off-by-one error.

agent/call-pinentry.c

index def3320..5092375 100644 (file)
@@ -830,7 +830,7 @@ agent_askpin (ctrl_t ctrl,
 
          *pininfo->pin = 0; /* Reset the PIN. */
          rc = pinentry_loopback(ctrl, "PASSPHRASE", &passphrase, &size,
-                 pininfo->max_length);
+                 pininfo->max_length - 1);
          if (rc)
            return rc;