This array was undersized, yielding undefined behavior. It happened to
work OK when compiled -O2 with GCC 4.7.x for x86, and fail with compiled
-O0 in the same environment. This fixes the problem.
Reported by John Darrington.
uint8_t cmac[16])
{
const char zeros[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- uint32_t rk[4 * RIJNDAEL_MAXNR + 1];
+ uint32_t rk[4 * (RIJNDAEL_MAXNR + 1)];
uint8_t k1[16], k2[16], L[16];
const uint8_t *data = data_;
uint8_t c[16], tmp[16];