diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-04-04 18:16:01 +0200 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-04-10 13:14:15 +0100 |
commit | dcccb1fb7bb79bdd018b23ca203d26cca98a1d3f (patch) | |
tree | 9857c974e6513d85df1878ffffc529a4916478dc /src/net/tls.c | |
parent | ede37e493d61c0cfbe04ab38bcc9819216756abf (diff) | |
download | ipxe-dcccb1fb7bb79bdd018b23ca203d26cca98a1d3f.tar.gz |
[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>
Diffstat (limited to 'src/net/tls.c')
-rw-r--r-- | src/net/tls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/tls.c b/src/net/tls.c index ce39da9a9..0f11fbe2f 100644 --- a/src/net/tls.c +++ b/src/net/tls.c @@ -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; } |