diff options
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/aes.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/crypto/aes.cpp b/src/crypto/aes.cpp index 1d469d0fb4..5e70d25eee 100644 --- a/src/crypto/aes.cpp +++ b/src/crypto/aes.cpp @@ -112,7 +112,6 @@ static int CBCEncrypt(const T& enc, const unsigned char iv[AES_BLOCKSIZE], const template <typename T> static int CBCDecrypt(const T& dec, const unsigned char iv[AES_BLOCKSIZE], const unsigned char* data, int size, bool pad, unsigned char* out) { - unsigned char padsize = 0; int written = 0; bool fail = false; const unsigned char* prev = iv; @@ -136,7 +135,7 @@ static int CBCDecrypt(const T& dec, const unsigned char iv[AES_BLOCKSIZE], const if (pad) { // If used, padding size is the value of the last decrypted byte. For // it to be valid, It must be between 1 and AES_BLOCKSIZE. - padsize = *--out; + unsigned char padsize = *--out; fail = !padsize | (padsize > AES_BLOCKSIZE); // If not well-formed, treat it as though there's no padding. |