if (error_msg) {
/* A socket error has occurred. */
logevent(raw->frontend, error_msg);
if (error_msg) {
/* A socket error has occurred. */
logevent(raw->frontend, error_msg);
- connection_fatal("%s", error_msg);
+ connection_fatal(raw->frontend, "%s", error_msg);
} /* Otherwise, the remote side closed the connection normally. */
return 0;
}
} /* Otherwise, the remote side closed the connection normally. */
return 0;
}
if (error_msg) {
/* A socket error has occurred. */
logevent(rlogin->frontend, error_msg);
if (error_msg) {
/* A socket error has occurred. */
logevent(rlogin->frontend, error_msg);
- connection_fatal("%s", error_msg);
+ connection_fatal(rlogin->frontend, "%s", error_msg);
} /* Otherwise, the remote side closed the connection normally. */
return 0;
}
} /* Otherwise, the remote side closed the connection normally. */
return 0;
}
if (error_msg) {
/* A socket error has occurred. */
logevent(error_msg);
if (error_msg) {
/* A socket error has occurred. */
logevent(error_msg);
- connection_fatal(ssh->frontend, error_msg);
+ connection_fatal(ssh->frontend, "%s", error_msg);
} else {
/* Otherwise, the remote side closed the connection normally. */
}
} else {
/* Otherwise, the remote side closed the connection normally. */
}
if (error_msg) {
/* A socket error has occurred. */
logevent(telnet->frontend, error_msg);
if (error_msg) {
/* A socket error has occurred. */
logevent(telnet->frontend, error_msg);
- connection_fatal("%s", error_msg);
+ connection_fatal(telnet->frontend, "%s", error_msg);
} /* Otherwise, the remote side closed the connection normally. */
return 0;
}
} /* Otherwise, the remote side closed the connection normally. */
return 0;
}
void connection_fatal(void *frontend, char *fmt, ...)
{
va_list ap;
void connection_fatal(void *frontend, char *fmt, ...)
{
va_list ap;
- char stuff[200], morestuff[100];
+ char *stuff, morestuff[100];
- vsprintf(stuff, fmt, ap);
+ stuff = dupvprintf(fmt, ap);
va_end(ap);
sprintf(morestuff, "%.70s Fatal Error", appname);
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
va_end(ap);
sprintf(morestuff, "%.70s Fatal Error", appname);
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
if (cfg.close_on_exit == FORCE_ON)
PostQuitMessage(1);
else {
if (cfg.close_on_exit == FORCE_ON)
PostQuitMessage(1);
else {
void cmdline_error(char *fmt, ...)
{
va_list ap;
void cmdline_error(char *fmt, ...)
{
va_list ap;
- char stuff[200], morestuff[100];
+ char *stuff, morestuff[100];
- vsprintf(stuff, fmt, ap);
+ stuff = dupvprintf(fmt, ap);
va_end(ap);
sprintf(morestuff, "%.70s Command Line Error", appname);
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
va_end(ap);
sprintf(morestuff, "%.70s Command Line Error", appname);
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
void fatalbox(char *fmt, ...)
{
va_list ap;
void fatalbox(char *fmt, ...)
{
va_list ap;
- char stuff[200], morestuff[100];
+ char *stuff, morestuff[100];
- vsprintf(stuff, fmt, ap);
+ stuff = dupvprintf(fmt, ap);
va_end(ap);
sprintf(morestuff, "%.70s Fatal Error", appname);
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
va_end(ap);
sprintf(morestuff, "%.70s Fatal Error", appname);
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
void modalfatalbox(char *fmt, ...)
{
va_list ap;
void modalfatalbox(char *fmt, ...)
{
va_list ap;
- char stuff[200], morestuff[100];
+ char *stuff, morestuff[100];
- vsprintf(stuff, fmt, ap);
+ stuff = dupvprintf(fmt, ap);
va_end(ap);
sprintf(morestuff, "%.70s Fatal Error", appname);
MessageBox(hwnd, stuff, morestuff,
MB_SYSTEMMODAL | MB_ICONERROR | MB_OK);
va_end(ap);
sprintf(morestuff, "%.70s Fatal Error", appname);
MessageBox(hwnd, stuff, morestuff,
MB_SYSTEMMODAL | MB_ICONERROR | MB_OK);