mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 17:39:08 +00:00
tests/checkasm/aes: fix memcmp size argument
sizeof(16 * count) evaluates to 4 and thus only the first 4 bytes of aes output was being compared. Removing the sizeof operator will ensure that the whole output buffer will be compared.
This commit is contained in:
committed by
Martin Storsjö
parent
a09be9b91e
commit
7b9eeadda0
@@ -46,13 +46,13 @@ void checkasm_check_aes(void)
|
||||
iv[0][j] = iv[1][j] = rnd();
|
||||
call_ref(&b, temp[0], pt, count, iv[0], b.rounds);
|
||||
call_new(&b, temp[1], pt, count, iv[1], b.rounds);
|
||||
if (memcmp(temp[0], temp[1], sizeof(16 * count)))
|
||||
if (memcmp(temp[0], temp[1], 16 * count))
|
||||
fail();
|
||||
if (memcmp(iv[0], iv[1], sizeof(iv[0])))
|
||||
fail();
|
||||
call_ref(&b, temp[0], pt, count, NULL, b.rounds);
|
||||
call_new(&b, temp[1], pt, count, NULL, b.rounds);
|
||||
if (memcmp(temp[0], temp[1], sizeof(16 * count)))
|
||||
if (memcmp(temp[0], temp[1], 16 * count))
|
||||
fail();
|
||||
if (memcmp(iv[0], iv[1], sizeof(iv[0])))
|
||||
fail();
|
||||
|
||||
Reference in New Issue
Block a user