summaryrefslogtreecommitdiff
path: root/doc
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 /doc
parentf96534966c706c554238799306c50177d9eb2dc7 (diff)
downloadgnutls-33c9df0071d268e27d63bdb897c6a55e036c2768.tar.gz
corrected length calculation
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/ex-cert-select-pkcs11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/ex-cert-select-pkcs11.c b/doc/examples/ex-cert-select-pkcs11.c
index 5aaba6d309..8e29a2586f 100644
--- a/doc/examples/ex-cert-select-pkcs11.c
+++ b/doc/examples/ex-cert-select-pkcs11.c
@@ -63,7 +63,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;