speakup: Avoid crash on very long word
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 23 Mar 2024 16:48:43 +0000 (17:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2024 15:05:28 +0000 (17:05 +0200)
commit0d130158db29f5e0b3893154908cf618896450a8
treee8b3ccee08f7e53067eab0f0894c2d416b6be4ce
parentd8a2225f7dfafc0c197053798123b64457e01cac
speakup: Avoid crash on very long word

commit c8d2f34ea96ea3bce6ba2535f867f0d4ee3b22e1 upstream.

In case a console is set up really large and contains a really long word
(> 256 characters), we have to stop before the length of the word buffer.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Fixes: c6e3fd22cd538 ("Staging: add speakup to the staging directory")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240323164843.1426997-1-samuel.thibault@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/accessibility/speakup/main.c