diff options
-rw-r--r-- | lib/x509/pkcs12_encr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/x509/pkcs12_encr.c b/lib/x509/pkcs12_encr.c index d8fd49f822..f925fd8cbc 100644 --- a/lib/x509/pkcs12_encr.c +++ b/lib/x509/pkcs12_encr.c @@ -105,7 +105,7 @@ _gnutls_pkcs12_string_to_key(const mac_entry_st * me, } /* Store salt and password in BUF_I */ - p_size = (((2*pwlen) / 64) * 64) + 64; + p_size = (((2*(pwlen+1)) / 64) * 64) + 64; if (p_size > sizeof(buf_i) - 64) return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); |