Merge pull request #7146 from bakersdozen123/fix/custom-ssh-heap-overflow

ssh: fix custom ssh heap buffer overflow
This commit is contained in:
Edward Thomson
2025-12-06 13:24:59 +00:00
committed by GitHub

View File

@@ -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);
}