mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +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);
|
ssh_string_free(blob);
|
||||||
|
blob = NULL;
|
||||||
|
|
||||||
reply = ssh_buffer_new();
|
reply = ssh_buffer_new();
|
||||||
if (reply == NULL) {
|
if (reply == NULL) {
|
||||||
@@ -451,6 +452,7 @@ ssh_string agent_sign_data(struct ssh_session_struct *session,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ssh_buffer_free(request);
|
ssh_buffer_free(request);
|
||||||
|
request = NULL;
|
||||||
|
|
||||||
/* check if reply is valid */
|
/* check if reply is valid */
|
||||||
if (buffer_get_u8(reply, (uint8_t *) &type) != sizeof(uint8_t)) {
|
if (buffer_get_u8(reply, (uint8_t *) &type) != sizeof(uint8_t)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user