mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
upstream commit
fix use-after-free in ~^Z escape handler path, introduced in channels.c refactor; spotted by millert@ "makes sense" deraadt@ Upstream-ID: 8fa2cdc65c23ad6420c1e59444b0c955b0589b22
This commit is contained in:
parent
a3839d8d2b
commit
5b8da1f538
17
clientloop.c
17
clientloop.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: clientloop.c,v 1.304 2017/09/12 06:35:32 djm Exp $ */
|
/* $OpenBSD: clientloop.c,v 1.305 2017/09/19 04:24:22 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -600,13 +600,9 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
|
|||||||
|
|
||||||
leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
|
leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
|
||||||
|
|
||||||
/*
|
sshbuf_reset(bin);
|
||||||
* Free (and clear) the buffer to reduce the amount of data that gets
|
sshbuf_reset(bout);
|
||||||
* written to swap.
|
sshbuf_reset(berr);
|
||||||
*/
|
|
||||||
buffer_free(bin);
|
|
||||||
buffer_free(bout);
|
|
||||||
buffer_free(berr);
|
|
||||||
|
|
||||||
/* Send the suspend signal to the program itself. */
|
/* Send the suspend signal to the program itself. */
|
||||||
kill(getpid(), SIGTSTP);
|
kill(getpid(), SIGTSTP);
|
||||||
@ -614,11 +610,6 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
|
|||||||
/* Reset window sizes in case they have changed */
|
/* Reset window sizes in case they have changed */
|
||||||
received_window_change_signal = 1;
|
received_window_change_signal = 1;
|
||||||
|
|
||||||
/* OK, we have been continued by the user. Reinitialize buffers. */
|
|
||||||
buffer_init(bin);
|
|
||||||
buffer_init(bout);
|
|
||||||
buffer_init(berr);
|
|
||||||
|
|
||||||
enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
|
enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user