void modalfatalbox(char *fmt, ...)
{
va_list ap;
- char stuff[200];
+ char *buf;
va_start(ap, fmt);
- vsprintf(stuff, fmt, ap);
+ buf = dupvprintf(fmt, ap);
va_end(ap);
- MessageBox(main_hwnd, stuff, "Pageant Fatal Error",
+ MessageBox(main_hwnd, buf, "Pageant Fatal Error",
MB_SYSTEMMODAL | MB_ICONERROR | MB_OK);
+ sfree(buf);
exit(1);
}
};
static int cmpkeys_ssh2_asymm(void *av, void *bv);
-/*
- * This function is needed to link with the DES code. We need not
- * have it do anything at all.
- */
-void logevent(char *msg)
-{
-}
-
#define GET_32BIT(cp) \
(((unsigned long)(unsigned char)(cp)[0] << 24) | \
((unsigned long)(unsigned char)(cp)[1] << 16) | \
of.lStructSize = sizeof(of);
#endif
of.hwndOwner = main_hwnd;
- of.lpstrFilter = "PuTTY Private Key Files\0*.PPK\0AllFiles\0*\0\0\0";
+ of.lpstrFilter = "PuTTY Private Key Files (*.ppk)\0*.PPK\0"
+ "AllFiles\0*\0\0\0";
of.lpstrCustomFilter = NULL;
of.nFilterIndex = 1;
of.lpstrFile = filelist;
{
if (ShellExecute(NULL, _T("open"), cmdline,
args, NULL, show) <= (HINSTANCE) 32) {
- TCHAR sMsg[140];
- sprintf(sMsg, _T("Failed to run \"%.100s\", Error: %d"), cmdline,
- (int)GetLastError());
- MessageBox(NULL, sMsg, APPNAME, MB_OK | MB_ICONEXCLAMATION);
+ char *msg;
+ msg = dupprintf("Failed to run \"%.100s\", Error: %d", cmdline,
+ (int)GetLastError());
+ MessageBox(NULL, msg, APPNAME, MB_OK | MB_ICONEXCLAMATION);
+ sfree(msg);
}
}