mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Merge pull request #7146 from bakersdozen123/fix/custom-ssh-heap-overflow
ssh: fix custom ssh heap buffer overflow
This commit is contained in:
@@ -161,7 +161,7 @@ static void ssh_custom_free(struct git_credential *cred)
|
||||
|
||||
if (c->publickey) {
|
||||
/* Zero the memory which previously held the publickey */
|
||||
size_t key_len = strlen(c->publickey);
|
||||
size_t key_len = c->publickey_len;
|
||||
git__memzero(c->publickey, key_len);
|
||||
git__free(c->publickey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user