mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 21:23:51 +00:00
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.
This commit is contained in:
parent
d5c8ba1690
commit
d857faf18e
@ -810,7 +810,7 @@ static sign_key *openssh_read(const char *filename, char * UNUSED(passphrase))
|
|||||||
}
|
}
|
||||||
m_burn(key->keyblob, key->keyblob_size);
|
m_burn(key->keyblob, key->keyblob_size);
|
||||||
m_free(key->keyblob);
|
m_free(key->keyblob);
|
||||||
m_burn(key, sizeof(key));
|
m_burn(key, sizeof(*key));
|
||||||
m_free(key);
|
m_free(key);
|
||||||
if (errmsg) {
|
if (errmsg) {
|
||||||
fprintf(stderr, "Error: %s\n", errmsg);
|
fprintf(stderr, "Error: %s\n", errmsg);
|
||||||
|
Loading…
Reference in New Issue
Block a user