From 1ad8b2897aaa28257a7a4e0acfca134b50a30a3d Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Wed, 27 Aug 2025 13:58:09 -0600 Subject: [PATCH] Force zero with bufferSize instead of length. add void prototype to definitions --- src/internal.c | 2 +- wolfcrypt/src/memory.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal.c b/src/internal.c index b817bbfa8..f534d06d5 100644 --- a/src/internal.c +++ b/src/internal.c @@ -11004,7 +11004,7 @@ void ShrinkInputBuffer(WOLFSSL* ssl, int forcedFree) } ForceZero(ssl->buffers.inputBuffer.buffer, - ssl->buffers.inputBuffer.length); + ssl->buffers.inputBuffer.bufferSize); XFREE(ssl->buffers.inputBuffer.buffer - ssl->buffers.inputBuffer.offset, ssl->heap, DYNAMIC_TYPE_IN_BUFFER); ssl->buffers.inputBuffer.buffer = ssl->buffers.inputBuffer.staticBuffer; diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index 3bd5fc185..c2f8b2630 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -212,7 +212,7 @@ static wolfSSL_Mutex zeroMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(zeroMutex); /* Initialize the table of addresses and the mutex. */ -void wc_MemZero_Init() +void wc_MemZero_Init(void) { /* Clear the table to more easily see what is valid. */ XMEMSET(memZero, 0, sizeof(memZero)); @@ -226,7 +226,7 @@ void wc_MemZero_Init() /* Free the mutex and check we have not any uncheck addresses. */ -void wc_MemZero_Free() +void wc_MemZero_Free(void) { /* Free mutex. */ #ifndef WOLFSSL_MUTEX_INITIALIZER