mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-15 18:17:32 -05:00
log_proxy_stderr: limit the length of Event Log lines.
If a proxy command jabbers on standard error in a way that doesn't involve any newline characters, we now won't keep buffering data for ever. (Not that I've heard of it happening, but I noticed the theoretical possibility on the way past in a recent cleanup pass.)
This commit is contained in:
@ -290,7 +290,13 @@ void backend_socket_log(Seat *seat, LogContext *logctx,
|
||||
int type, SockAddr *addr, int port,
|
||||
const char *error_msg, int error_code, Conf *conf,
|
||||
bool session_started);
|
||||
|
||||
typedef struct ProxyStderrBuf {
|
||||
char buf[8192];
|
||||
size_t size;
|
||||
} ProxyStderrBuf;
|
||||
void psb_init(ProxyStderrBuf *psb);
|
||||
void log_proxy_stderr(
|
||||
Plug *plug, bufchain *buf, const void *vdata, size_t len);
|
||||
Plug *plug, ProxyStderrBuf *psb, const void *vdata, size_t len);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user