The output from AES_cbc_encrypt() should be exact multiple blocks when encrypting
authorRichard Levitte <levitte@openssl.org>
Tue, 10 Jun 2003 04:11:42 +0000 (04:11 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 10 Jun 2003 04:11:42 +0000 (04:11 +0000)
crypto/aes/aes_cbc.c

index 01e965a..86b27b1 100644 (file)
@@ -86,7 +86,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
                        for(n=len; n < AES_BLOCK_SIZE; ++n)
                                tmp[n] = ivec[n];
                        AES_encrypt(tmp, tmp, key);
-                       memcpy(out, tmp, len);
+                       memcpy(out, tmp, AES_BLOCK_SIZE);
                        memcpy(ivec, tmp, AES_BLOCK_SIZE);
                }                       
        } else {