Force zero with bufferSize instead of length. add void prototype to definitions

This commit is contained in:
Ruby Martin
2025-08-27 13:58:09 -06:00
parent 7aab2f3b47
commit 1ad8b2897a
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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