diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-04 11:06:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-01 09:44:25 +0100 |
commit | 3540460e924b3fd975c2a824d33776ed04ba445e (patch) | |
tree | 42176cf33356c5d8acdefd02a7047635b086e1fa /drivers/tty | |
parent | 674004e6c4fcf6b7a9a70cdefec2f2fd0069fa0a (diff) |
tty: wipe buffer.
commit c9a8e5fce009e3c601a43c49ea9dbcb25d1ffac5 upstream.
After we are done with the tty buffer, zero it out.
Reported-by: aszlig <aszlig@nix.build>
Tested-by: Milan Broz <gmazyland@gmail.com>
Tested-by: Daniel Zatovic <daniel.zatovic@gmail.com>
Tested-by: aszlig <aszlig@nix.build>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/tty_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index e99f1c5b1df6..41b9a7ccce08 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -458,6 +458,8 @@ int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p, if (count && ld->ops->receive_buf) ld->ops->receive_buf(ld->tty, p, f, count); } + if (count > 0) + memset(p, 0, count); return count; } EXPORT_SYMBOL_GPL(tty_ldisc_receive_buf); |