{
MessageBox(hwnd, "Internal Error", APPNAME, MB_OK | MB_ICONERROR);
exit(0);
{
MessageBox(hwnd, "Internal Error", APPNAME, MB_OK | MB_ICONERROR);
exit(0);
int dlgret;
dlgret = DialogBoxParam(instance, MAKEINTRESOURCE(210),
NULL, PassphraseProc, (LPARAM) & pps);
int dlgret;
dlgret = DialogBoxParam(instance, MAKEINTRESOURCE(210),
NULL, PassphraseProc, (LPARAM) & pps);
int reqlen, clen, resplen;
clen = strlen(rkey->comment);
int reqlen, clen, resplen;
clen = strlen(rkey->comment);
- agent_query(request, reqlen, &response, &resplen);
+ agent_query(request, reqlen, &vresponse, &resplen);
+ response = vresponse;
if (resplen < 5 || response[4] != SSH_AGENT_SUCCESS)
MessageBox(NULL, "The already running Pageant "
"refused to add the key.", APPNAME,
if (resplen < 5 || response[4] != SSH_AGENT_SUCCESS)
MessageBox(NULL, "The already running Pageant "
"refused to add the key.", APPNAME,
int reqlen, alglen, clen, keybloblen, resplen;
alglen = strlen(skey->alg->name);
clen = strlen(skey->comment);
int reqlen, alglen, clen, keybloblen, resplen;
alglen = strlen(skey->alg->name);
clen = strlen(skey->comment);
- agent_query(request, reqlen, &response, &resplen);
+ agent_query(request, reqlen, &vresponse, &resplen);
+ response = vresponse;
if (resplen < 5 || response[4] != SSH_AGENT_SUCCESS)
MessageBox(NULL, "The already running Pageant"
"refused to add the key.", APPNAME,
if (resplen < 5 || response[4] != SSH_AGENT_SUCCESS)
MessageBox(NULL, "The already running Pageant"
"refused to add the key.", APPNAME,
key = smalloc(sizeof(struct RSAKey));
memset(key, 0, sizeof(key));
p += makekey(p, key, NULL, 1);
p += makeprivate(p, key);
key = smalloc(sizeof(struct RSAKey));
memset(key, 0, sizeof(key));
p += makekey(p, key, NULL, 1);
p += makeprivate(p, key);
- p += ssh1_read_bignum(p, key->iqmp); /* p^-1 mod q */
- p += ssh1_read_bignum(p, key->p); /* p */
- p += ssh1_read_bignum(p, key->q); /* q */
- comment = smalloc(GET_32BIT(p));
+ p += ssh1_read_bignum(p, &key->iqmp); /* p^-1 mod q */
+ p += ssh1_read_bignum(p, &key->p); /* p */
+ p += ssh1_read_bignum(p, &key->q); /* q */
+ commentlen = GET_32BIT(p);
+ comment = smalloc(commentlen+1);
- memcpy(comment, p + 4, GET_32BIT(p));
+ memcpy(comment, p + 4, commentlen);
+ comment[commentlen] = '\0';
SendMessage(hwnd, WM_CLOSE, 0, 0);
break;
case IDM_VIEWKEYS:
SendMessage(hwnd, WM_CLOSE, 0, 0);
break;
case IDM_VIEWKEYS:
PSID mapowner, procowner;
PSECURITY_DESCRIPTOR psd1 = NULL, psd2 = NULL;
PSID mapowner, procowner;
PSECURITY_DESCRIPTOR psd1 = NULL, psd2 = NULL;
debug(("filemap is %p\n", filemap));
#endif
if (filemap != NULL && filemap != INVALID_HANDLE_VALUE) {
debug(("filemap is %p\n", filemap));
#endif
if (filemap != NULL && filemap != INVALID_HANDLE_VALUE) {
if (has_security) {
if ((proc = OpenProcess(MAXIMUM_ALLOWED, FALSE,
GetCurrentProcessId())) ==
if (has_security) {
if ((proc = OpenProcess(MAXIMUM_ALLOWED, FALSE,
GetCurrentProcessId())) ==
NULL, NULL, show) <= (HINSTANCE) 32) {
TCHAR sMsg[140];
sprintf(sMsg, _T("Failed to run \"%.100s\", Error: %d"), cmdline,
NULL, NULL, show) <= (HINSTANCE) 32) {
TCHAR sMsg[140];
sprintf(sMsg, _T("Failed to run \"%.100s\", Error: %d"), cmdline,
MessageBox(NULL, sMsg, APPNAME, MB_OK | MB_ICONEXCLAMATION);
}
}
MessageBox(NULL, sMsg, APPNAME, MB_OK | MB_ICONEXCLAMATION);
}
}