]> git.baikalelectronics.ru Git - kernel.git/commit
n_tty: Fix echo overrun tail computation
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 8 Nov 2013 14:42:18 +0000 (09:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2013 16:35:00 +0000 (08:35 -0800)
commit7e5104153e5fa95f7cf10879c2a58290929c6fc5
tree21445d1f3e606048db55a3cb07e6bdcd8f5c8485
parent78e99ec207f2f9b8aecc9b6942f4b38eebe130b2
n_tty: Fix echo overrun tail computation

Commit 1d0cca54b1dd573e06e3ed34db6751394f8e132d,
'n_tty: Process echoes in blocks', introduced an error when
consuming the echo buffer tail to prevent buffer overrun, where
the incorrect operation code byte is checked to determine how
far to advance the tail to the next echo byte.

Check the correct byte for the echo operation code byte.

Cc: <stable@vger.kernel.org> # 3.12.x : 4f89454 tty: incorrect test of echo_buf() result for ECHO_OP_START
Cc: <stable@vger.kernel.org> # 3.12.x
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c