diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2024-05-14 17:04:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-04 14:07:27 +0200 |
commit | b19ab7ee2c4c1ec5f27c18413c3ab63907f7d55c (patch) | |
tree | 21bc75b2c026234aedd9ea878490aae456ac157b /lib/crypto/mpi/mpi-internal.h | |
parent | c3f38fa61af77b49866b006939479069cd451173 (diff) |
tty: n_tty: Fix buffer offsets when lookahead is used
When lookahead has "consumed" some characters (la_count > 0),
n_tty_receive_buf_standard() and n_tty_receive_buf_closing() for
characters beyond the la_count are given wrong cp/fp offsets which
leads to duplicating and losing some characters.
If la_count > 0, correct buffer pointers and make count consistent too
(the latter is not strictly necessary to fix the issue but seems more
logical to adjust all variables immediately to keep state consistent).
Reported-by: Vadym Krevs <vkrevs@yahoo.com>
Fixes: 6bb6fa6908eb ("tty: Implement lookahead to process XON/XOFF timely")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218834
Tested-by: Vadym Krevs <vkrevs@yahoo.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240514140429.12087-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/crypto/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions