summaryrefslogtreecommitdiffhomepage
path: root/keyimport.c
diff options
context:
space:
mode:
authorChristian Engelmayer <cengelma@gmx.at>2015-01-28 22:42:29 +0800
committerChristian Engelmayer <cengelma@gmx.at>2015-01-28 22:42:29 +0800
commitd857faf18e5426e6bf2070cff67b7b23c10946a4 (patch)
tree185d7c4ee7dcf54478b1659e73a9175eb831e674 /keyimport.c
parentd5c8ba1690c688dfaa8b7c711813a1e921711502 (diff)
When clearing the memory of 'key' in function openssh_read(), only the size
of the pointer to the data instead of the whole size of struct openssh_key is cleared. Correct the size calculation as detected by Coverity CID 1191543.
Diffstat (limited to 'keyimport.c')
-rw-r--r--keyimport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/keyimport.c b/keyimport.c
index 272fcce..6f2634f 100644
--- a/keyimport.c
+++ b/keyimport.c
@@ -810,7 +810,7 @@ static sign_key *openssh_read(const char *filename, char * UNUSED(passphrase))
}
m_burn(key->keyblob, key->keyblob_size);
m_free(key->keyblob);
- m_burn(key, sizeof(key));
+ m_burn(key, sizeof(*key));
m_free(key);
if (errmsg) {
fprintf(stderr, "Error: %s\n", errmsg);