summaryrefslogtreecommitdiff
path: root/src/common.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-10-10 13:10:25 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-10-10 13:10:50 +0200
commit33c9df0071d268e27d63bdb897c6a55e036c2768 (patch)
tree10a76b24f9d2611b6c427c6b9301640ccd973f0e /src/common.c
parentf96534966c706c554238799306c50177d9eb2dc7 (diff)
downloadgnutls-33c9df0071d268e27d63bdb897c6a55e036c2768.tar.gz
corrected length calculation
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c
index d4331f8428..cdb09f6c04 100644
--- a/src/common.c
+++ b/src/common.c
@@ -1045,7 +1045,7 @@ pin_callback (void *user, int attempt, const char *token_url,
exit (1);
}
- len = 1 + MIN (pin_max, strlen (password));
+ len = MIN (pin_max-1, strlen (password));
memcpy (pin, password, len);
pin[len] = 0;