Changeset 9938
- Timestamp:
- 10/23/14 18:22:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r9871 r9938 176 176 case MODE_CMD_0x0C_RC6 : //RC6 177 177 { 178 int32_t i; 178 // buf may be unaligned, 179 // so we use malloc() memory for the uint32_t* cast 180 uint8_t *tmp; 181 int32_t i; 182 183 if(!cs_malloc(&tmp, len)) 184 { return; } 185 memcpy(tmp, buf, len); 186 179 187 SwapLBi(buf, len); 180 188 for(i = 0; i < len / 16; i++) 181 { rc6_block_decrypt((uint32_t *)( buf+ i * 16), (uint32_t *)(out + i * 16), 1, cc->cmd0c_RC6_cryptkey); }189 { rc6_block_decrypt((uint32_t *)(tmp + i * 16), (uint32_t *)(out + i * 16), 1, cc->cmd0c_RC6_cryptkey); } 182 190 SwapLBi(out, len); 191 NULLFREE(tmp); 183 192 break; 184 193 }
Note:
See TracChangeset
for help on using the changeset viewer.