CVE-2012-4559: Ensure we don't free blob or request twice.

This commit is contained in:
Andreas Schneider
2012-10-05 14:33:29 +02:00
parent b485463197
commit 1471f2c67a

View File

@@ -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)) {