forked from wolfSSL/wolfssl
Merge pull request #6109 from nunojpg/master
Fix out of bound memset to 0
This commit is contained in:
@ -2030,7 +2030,7 @@ int wolfSSL_session_export_internal(WOLFSSL* ssl, byte* buf, word32* sz,
|
||||
}
|
||||
}
|
||||
|
||||
if (ret != 0 && buf != NULL) {
|
||||
if (ret != 0 && ret != LENGTH_ONLY_E && buf != NULL) {
|
||||
/*in a fail case clear the buffer which could contain partial key info*/
|
||||
XMEMSET(buf, 0, *sz);
|
||||
}
|
||||
|
Reference in New Issue
Block a user