PR #23760 opened by Shreesh Adiga (tantei3)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23760
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23760.patch

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.


>From f53c11836efc3bdf737898b41f1dc844bc8bb76e Mon Sep 17 00:00:00 2001
From: Shreesh Adiga <[email protected]>
Date: Fri, 10 Jul 2026 18:27:46 +0530
Subject: [PATCH] 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.
---
 tests/checkasm/aes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/checkasm/aes.c b/tests/checkasm/aes.c
index c5502118fa..4bbfc5750b 100644
--- a/tests/checkasm/aes.c
+++ b/tests/checkasm/aes.c
@@ -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();
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to