diff options
author | Christian Engelmayer <cengelma@gmx.at> | 2015-01-28 22:42:29 +0800 |
---|---|---|
committer | Christian Engelmayer <cengelma@gmx.at> | 2015-01-28 22:42:29 +0800 |
commit | d857faf18e5426e6bf2070cff67b7b23c10946a4 (patch) | |
tree | 185d7c4ee7dcf54478b1659e73a9175eb831e674 | |
parent | d5c8ba1690c688dfaa8b7c711813a1e921711502 (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.
-rw-r--r-- | keyimport.c | 2 |
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); |