From dad574edb8219b5467f94ae5bd04bfbf063cf2d1 Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 16 May 2018 14:34:16 -0700 Subject: [PATCH] Fix to use proper type (`size_t`) for alignment check. --- wolfcrypt/src/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/misc.c b/wolfcrypt/src/misc.c index b56d16e48..1fbe774da 100644 --- a/wolfcrypt/src/misc.c +++ b/wolfcrypt/src/misc.c @@ -205,7 +205,7 @@ STATIC INLINE void ForceZero(const void* mem, word32 len) volatile word64* w; /* align buffer */ - while (len && ((word64)z % sizeof(word64)) != 0) { + while (len && ((size_t)z % sizeof(word64)) != 0) { *z++ = 0; len--; } @@ -217,7 +217,7 @@ STATIC INLINE void ForceZero(const void* mem, word32 len) volatile word32* w; /* align buffer */ - while (len && ((word32)z % sizeof(word32)) != 0) { + while (len && ((size_t)z % sizeof(word32)) != 0) { *z++ = 0; len--; }