Skip to content

Commit 624e6f8

Browse files
committed
[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 <[email protected]> (cherry picked from commit aa22913)
1 parent c72ed15 commit 624e6f8

File tree

1 file changed

+1
-1
lines changed
  • boot/bootutil/include/bootutil/crypto

1 file changed

+1
-1
lines changed

boot/bootutil/include/bootutil/crypto/aes_ctr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void bootutil_aes_ctr_init(bootutil_aes_ctr_context *ctx);
5858

5959
static inline void bootutil_aes_ctr_drop(bootutil_aes_ctr_context *ctx)
6060
{
61-
memset(ctx, 0, sizeof(ctx));
61+
memset(ctx, 0, sizeof(*ctx));
6262
}
6363

6464
static inline int bootutil_aes_ctr_set_key(bootutil_aes_ctr_context *ctx, const uint8_t *k)

0 commit comments

Comments
 (0)