Skip to content

Commit 96a246f

Browse files
committed
[nrf fromlist] bootutil: Fix bootutil_aes_ctr_drop memset usage
memset was given incorrectly pointer size, instead of object size. Upstream PR #: 2424 Signed-off-by: Dominik Ermel <[email protected]>
1 parent c72ed15 commit 96a246f

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)