diff options
author | Stefan Weil | 2012-04-04 18:16:01 +0200 |
---|---|---|
committer | Michael Brown | 2012-04-10 14:14:15 +0200 |
commit | dcccb1fb7bb79bdd018b23ca203d26cca98a1d3f (patch) | |
tree | 9857c974e6513d85df1878ffffc529a4916478dc /src/net/tls.c | |
parent | [crypto] Fix wrong setup in function aes_wrap (diff) | |
download | ipxe-dcccb1fb7bb79bdd018b23ca203d26cca98a1d3f.tar.gz ipxe-dcccb1fb7bb79bdd018b23ca203d26cca98a1d3f.tar.xz ipxe-dcccb1fb7bb79bdd018b23ca203d26cca98a1d3f.zip |
[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 ce39da9a..0f11fbe2 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; } |