diff options
Diffstat (limited to 'src/crypt/cryptclassevp.cpp')
| -rw-r--r-- | src/crypt/cryptclassevp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypt/cryptclassevp.cpp b/src/crypt/cryptclassevp.cpp index 1ee09a0..7aec7b6 100644 --- a/src/crypt/cryptclassevp.cpp +++ b/src/crypt/cryptclassevp.cpp @@ -19,9 +19,9 @@ void CryptClassEvp::encrypt() EVP_CIPHER_CTX *ctx; - int len; + int len = 0; - int ciphertext_len; + int ciphertext_len = 0; /* Create and initialise the context */ if (!(ctx = EVP_CIPHER_CTX_new())) @@ -58,6 +58,7 @@ void CryptClassEvp::encrypt() ciphertext_len += len; + m_cryptText.resize(ciphertext_len); /* Clean up */ EVP_CIPHER_CTX_free(ctx); } @@ -104,7 +105,7 @@ void CryptClassEvp::decrypt() } plaintext_len += len; - + m_clearText.resize(plaintext_len); /* Clean up */ EVP_CIPHER_CTX_free(ctx); } |
