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 01e965a532211b2cdfe09f161b179f129d1a3aca..86b27b10d612ab887ae3d4bbda666533783b1c0a 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 {