agent_list_identities: fix out of scope access
An auto variable out of scope was being referenced and used. fixes #220
This commit is contained in:
parent
9a24b03402
commit
2db7d9c655
@ -486,13 +486,13 @@ agent_list_identities(LIBSSH2_AGENT *agent)
|
|||||||
ssize_t len, num_identities;
|
ssize_t len, num_identities;
|
||||||
unsigned char *s;
|
unsigned char *s;
|
||||||
int rc;
|
int rc;
|
||||||
|
unsigned char c = SSH2_AGENTC_REQUEST_IDENTITIES;
|
||||||
|
|
||||||
/* Create a request to list identities */
|
/* Create a request to list identities */
|
||||||
if (transctx->state == agent_NB_state_init) {
|
if (transctx->state == agent_NB_state_init) {
|
||||||
unsigned char c = SSH2_AGENTC_REQUEST_IDENTITIES;
|
transctx->request = &c;
|
||||||
transctx->request = &c;
|
transctx->request_len = 1;
|
||||||
transctx->request_len = 1;
|
transctx->state = agent_NB_state_request_created;
|
||||||
transctx->state = agent_NB_state_request_created;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure to be re-called as a result of EAGAIN. */
|
/* Make sure to be re-called as a result of EAGAIN. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user