[Ffmpeg-cvslog] r7549 - trunk/libavutil/aes.c

michael subversion
Tue Jan 16 18:58:11 CET 2007


Author: michael
Date: Tue Jan 16 18:58:11 2007
New Revision: 7549

Modified:
   trunk/libavutil/aes.c

Log:
avoid memcpy()


Modified: trunk/libavutil/aes.c
==============================================================================
--- trunk/libavutil/aes.c	(original)
+++ trunk/libavutil/aes.c	Tue Jan 16 18:58:11 2007
@@ -172,10 +172,9 @@
 
     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);
         }




More information about the ffmpeg-cvslog mailing list