summaryrefslogtreecommitdiffstats
path: root/agent/call-pinentry.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2015-10-09 04:46:23 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2015-10-09 04:46:23 +0200
commit818fa4f71e1056831b35d0f8aff715c0e1d537e6 (patch)
tree0af8b29b5378e73f729cc040fba7476edbb9194b /agent/call-pinentry.c
parentagent: Fix function return type for check_cb and agent_askpin. (diff)
downloadgnupg2-818fa4f71e1056831b35d0f8aff715c0e1d537e6.tar.xz
gnupg2-818fa4f71e1056831b35d0f8aff715c0e1d537e6.zip
agent: fix agent_askpin.
* agent/call-pinentry.c (agent_askpin): Fix off-by-one error.
Diffstat (limited to 'agent/call-pinentry.c')
-rw-r--r--agent/call-pinentry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index def33203d..5092375f0 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -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;