comparison aes.c @ 976:0a6c0fb069d2 libavutil

aes: fix array index out of bounds warning
author mru
date Sun, 04 Jul 2010 20:38:46 +0000
parents 90ee1cca76a2
children
comparison
equal deleted inserted replaced
975:c0a0cf0c61c7 976:0a6c0fb069d2
139 int KC= key_bits>>5; 139 int KC= key_bits>>5;
140 int rounds= KC + 6; 140 int rounds= KC + 6;
141 uint8_t log8[256]; 141 uint8_t log8[256];
142 uint8_t alog8[512]; 142 uint8_t alog8[512];
143 143
144 if(!enc_multbl[0][sizeof(enc_multbl)/sizeof(enc_multbl[0][0])-1]){ 144 if(!enc_multbl[FF_ARRAY_ELEMS(enc_multbl)-1][FF_ARRAY_ELEMS(enc_multbl[0])-1]){
145 j=1; 145 j=1;
146 for(i=0; i<255; i++){ 146 for(i=0; i<255; i++){
147 alog8[i]= 147 alog8[i]=
148 alog8[i+255]= j; 148 alog8[i+255]= j;
149 log8[j]= i; 149 log8[j]= i;