summaryrefslogtreecommitdiffstats
path: root/src/net/tls.c
diff options
context:
space:
mode:
authorStefan Weil2012-04-04 18:16:01 +0200
committerMichael Brown2012-04-10 14:14:15 +0200
commitdcccb1fb7bb79bdd018b23ca203d26cca98a1d3f (patch)
tree9857c974e6513d85df1878ffffc529a4916478dc /src/net/tls.c
parent[crypto] Fix wrong setup in function aes_wrap (diff)
downloadipxe-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.c2
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;
}