mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
CVE-2012-4559: Ensure we don't free blob or request twice.
This commit is contained in:
@@ -439,6 +439,7 @@ ssh_string agent_sign_data(struct ssh_session_struct *session,
|
||||
}
|
||||
|
||||
ssh_string_free(blob);
|
||||
blob = NULL;
|
||||
|
||||
reply = ssh_buffer_new();
|
||||
if (reply == NULL) {
|
||||
@@ -451,6 +452,7 @@ ssh_string agent_sign_data(struct ssh_session_struct *session,
|
||||
return NULL;
|
||||
}
|
||||
ssh_buffer_free(request);
|
||||
request = NULL;
|
||||
|
||||
/* check if reply is valid */
|
||||
if (buffer_get_u8(reply, (uint8_t *) &type) != sizeof(uint8_t)) {
|
||||
|
||||
Reference in New Issue
Block a user