Skip to content

Commit abea018

Browse files
committed
5-2 C3
1 parent 722e936 commit abea018

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

contrib/win32/win32compat/ssh-agent/agent-request.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ static int sign_blob(const struct sshkey *pubkey, u_char ** sig, size_t *siglen,
104104
DWORD regdatalen = 0;
105105
struct sshbuf* tmpbuf;
106106

107+
regdata = malloc(4);
108+
regdatalen = 4;
109+
107110
*sig = NULL;
108111
*siglen = 0;
109112

@@ -118,7 +121,7 @@ static int sign_blob(const struct sshkey *pubkey, u_char ** sig, size_t *siglen,
118121
NULL, &sub, NULL)) != 0)
119122
goto done;
120123

121-
if ((RegQueryValueEx(sub, NULL, 0, NULL, NULL, &regdatalen)) != ERROR_MORE_DATA) {
124+
if ((RegQueryValueEx(sub, NULL, 0, NULL, regdata, &regdatalen)) != ERROR_MORE_DATA) {
122125
r = EOTHER;
123126
goto done;
124127
}

contrib/win32/win32compat/ssh-agent/connection.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ process_request(struct agent_connection* con) {
139139
r = process_request_identities(request, response, con->client_token);
140140
break;
141141
case SSH2_AGENTC_SIGN_REQUEST:
142+
r = process_sign_request(request, response, con->client_token);
143+
break;
142144
default:
143145
r = EINVAL;
144146
goto done;

0 commit comments

Comments
 (0)