From 95b783e6bd412ac642b27df65a8e70889c952fbb Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Tue, 12 Aug 2025 09:27:35 +0000 Subject: [PATCH] [nrf fromtree] bootutil: Fix bootutil_aes_ctr_drop memset usage memset was given incorrectly pointer size, instead of object size. Signed-off-by: Dominik Ermel (cherry picked from commit aa229135b30e6ce9a24c9ae2cf3a85591d1aa7d6) --- boot/bootutil/include/bootutil/crypto/aes_ctr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootutil/include/bootutil/crypto/aes_ctr.h b/boot/bootutil/include/bootutil/crypto/aes_ctr.h index e5416dca0..88ae87c39 100644 --- a/boot/bootutil/include/bootutil/crypto/aes_ctr.h +++ b/boot/bootutil/include/bootutil/crypto/aes_ctr.h @@ -58,7 +58,7 @@ void bootutil_aes_ctr_init(bootutil_aes_ctr_context *ctx); static inline void bootutil_aes_ctr_drop(bootutil_aes_ctr_context *ctx) { - memset(ctx, 0, sizeof(ctx)); + memset(ctx, 0, sizeof(*ctx)); } static inline int bootutil_aes_ctr_set_key(bootutil_aes_ctr_context *ctx, const uint8_t *k)