Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
1001:a48561559584 | 1002:97d1e54941fd |
---|---|
808 buf_burn(blobbuf); | 808 buf_burn(blobbuf); |
809 buf_free(blobbuf); | 809 buf_free(blobbuf); |
810 } | 810 } |
811 m_burn(key->keyblob, key->keyblob_size); | 811 m_burn(key->keyblob, key->keyblob_size); |
812 m_free(key->keyblob); | 812 m_free(key->keyblob); |
813 m_burn(key, sizeof(key)); | 813 m_burn(key, sizeof(*key)); |
814 m_free(key); | 814 m_free(key); |
815 if (errmsg) { | 815 if (errmsg) { |
816 fprintf(stderr, "Error: %s\n", errmsg); | 816 fprintf(stderr, "Error: %s\n", errmsg); |
817 } | 817 } |
818 return retval; | 818 return retval; |