mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
extra cleanup in sniffer.c with ForceZero
This commit is contained in:
@ -1082,6 +1082,7 @@ static int LoadKeyFile(byte** keyBuf, word32* keyBufSz,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ForceZero(loadBuf, (word32)fileSz);
|
||||||
free(loadBuf);
|
free(loadBuf);
|
||||||
|
|
||||||
*keyBuf = saveBuf;
|
*keyBuf = saveBuf;
|
||||||
@ -3093,6 +3094,7 @@ doPart:
|
|||||||
* wants to null terminate plaintext */
|
* wants to null terminate plaintext */
|
||||||
tmpData = (byte*)realloc(*data, decoded + ret + 1);
|
tmpData = (byte*)realloc(*data, decoded + ret + 1);
|
||||||
if (tmpData == NULL) {
|
if (tmpData == NULL) {
|
||||||
|
ForceZero(*data, decoded);
|
||||||
free(*data);
|
free(*data);
|
||||||
*data = NULL;
|
*data = NULL;
|
||||||
SetError(MEMORY_STR, error, session,
|
SetError(MEMORY_STR, error, session,
|
||||||
|
Reference in New Issue
Block a user