aboutsummaryrefslogtreecommitdiff
path: root/libavutil/aes.c
diff options
context:
space:
mode:
authorMichael Niedermayer2007-01-16 17:58:11 +0000
committerMichael Niedermayer2007-01-16 17:58:11 +0000
commit2d3475ae6afc8fce33b6521aeb69489610b55f7e (patch)
treebff25a71a7d8782127d2754b70602fbdfa4c6820 /libavutil/aes.c
parent7465619af847813e118135f6f3ea9bd9329a507d (diff)
avoid memcpy()
Originally committed as revision 7549 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/aes.c')
-rw-r--r--libavutil/aes.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavutil/aes.c b/libavutil/aes.c
index f46b13cc6d..9921b54ee1 100644
--- a/libavutil/aes.c
+++ b/libavutil/aes.c
@@ -172,10 +172,9 @@ int av_aes_init(AVAES *a, uint8_t *key, int key_bits, int decrypt) {
if(decrypt){
for(i=1; i<rounds; i++){
- uint8_t tmp[2][16];
- memcpy(tmp[1], a->round_key[i][0], 16);
- subshift(tmp[0], 0, sbox);
- memcpy(tmp[1], tmp[0], 16);
+ uint8_t tmp[3][16];
+ memcpy(tmp[2], a->round_key[i][0], 16);
+ subshift(tmp[1], 0, sbox);
mix(tmp, dec_multbl, 1, 3);
memcpy(a->round_key[i][0], tmp[0], 16);
}