projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build-n-link new IA-64 modules on Linux and HP-UX.
[oweals/openssl.git]
/
crypto
/
aes
/
aes_cbc.c
diff --git
a/crypto/aes/aes_cbc.c
b/crypto/aes/aes_cbc.c
index 01e965a532211b2cdfe09f161b179f129d1a3aca..1222a21002c1add66fcfbf5fe57c84475838102b 100644
(file)
--- a/
crypto/aes/aes_cbc.c
+++ b/
crypto/aes/aes_cbc.c
@@
-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);
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 {
memcpy(ivec, tmp, AES_BLOCK_SIZE);
}
} else {
@@
-104,7
+104,7
@@
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
memcpy(tmp, in, AES_BLOCK_SIZE);
AES_decrypt(tmp, tmp, key);
for(n=0; n < len; ++n)
memcpy(tmp, in, AES_BLOCK_SIZE);
AES_decrypt(tmp, tmp, key);
for(n=0; n < len; ++n)
- out[n]
^=
ivec[n];
+ out[n]
= tmp[n] ^
ivec[n];
memcpy(ivec, tmp, AES_BLOCK_SIZE);
}
}
memcpy(ivec, tmp, AES_BLOCK_SIZE);
}
}