Skip to content

Commit aa22913

Browse files
committed
bootutil: Fix bootutil_aes_ctr_drop memset usage
memset was given incorrectly pointer size, instead of object size. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
1 parent 713b98b commit aa22913

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)