Revert "cryptfs: Don't hardcode ikey buffer size"
This reverts commit f45a70c416e74437bfc10e7a1dab55746f3edf25.
diff --git a/cryptfs.cpp b/cryptfs.cpp
index 1d21124..465fd60 100644
--- a/cryptfs.cpp
+++ b/cryptfs.cpp
@@ -1112,7 +1112,7 @@
unsigned char *encrypted_master_key,
struct crypt_mnt_ftr *crypt_ftr)
{
- unsigned char ikey[KEY_LEN_BYTES+IV_LEN_BYTES] = { 0 };
+ unsigned char ikey[32+32] = { 0 }; /* Big enough to hold a 256 bit key and 256 bit IV */
EVP_CIPHER_CTX e_ctx;
int encrypted_len, final_len;
int rc = 0;
@@ -1199,7 +1199,7 @@
unsigned char** intermediate_key,
size_t* intermediate_key_size)
{
- unsigned char ikey[KEY_LEN_BYTES+IV_LEN_BYTES] = { 0 };
+ unsigned char ikey[32+32] = { 0 }; /* Big enough to hold a 256 bit key and 256 bit IV */
EVP_CIPHER_CTX d_ctx;
int decrypted_len, final_len;