mirror of
https://github.com/xcat2/xNBA.git
synced 2025-02-16 02:28:24 +00:00
[tls] Fix wrong memset in function tls_clear_cipher
sizeof(cipherspec) is obviously wrong in this context, because it will only zero the first 4 or 8 bytes (cipherspec is a pointer). This problem was reported by cppcheck. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
ede37e493d
commit
dcccb1fb7b
@ -594,7 +594,7 @@ static void tls_clear_cipher ( struct tls_session *tls __unused,
|
||||
cipherspec->pubkey_ctx );
|
||||
}
|
||||
free ( cipherspec->dynamic );
|
||||
memset ( cipherspec, 0, sizeof ( cipherspec ) );
|
||||
memset ( cipherspec, 0, sizeof ( *cipherspec ) );
|
||||
cipherspec->suite = &tls_cipher_suite_null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user