diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-10-10 13:10:25 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-10-10 13:10:50 +0200 |
commit | 33c9df0071d268e27d63bdb897c6a55e036c2768 (patch) | |
tree | 10a76b24f9d2611b6c427c6b9301640ccd973f0e /doc | |
parent | f96534966c706c554238799306c50177d9eb2dc7 (diff) | |
download | gnutls-33c9df0071d268e27d63bdb897c6a55e036c2768.tar.gz |
corrected length calculation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/ex-cert-select-pkcs11.c | 2 |
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; |