Mercurial > dropbear
diff keyimport.c @ 1002:97d1e54941fd
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.
author | Christian Engelmayer <cengelma@gmx.at> |
---|---|
date | Wed, 28 Jan 2015 22:42:29 +0800 |
parents | 4f65c867fc99 |
children | d3925ed45a85 |
line wrap: on
line diff
--- a/keyimport.c Wed Jan 28 22:33:34 2015 +0800 +++ b/keyimport.c Wed Jan 28 22:42:29 2015 +0800 @@ -810,7 +810,7 @@ } 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);