summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-06 01:30:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-02 19:02:30 +0200
commit9ddb6c7ba85b21a6b9961cf22d87b30d4bce0f14 (patch)
tree04d7a3e0b51e43741951aaa60f934c659aebb733 /drivers
parent3ec889644d3f468d148fba584209cd67187e762b (diff)
staging/speakup: fix get_word non-space look-ahead
commit 9d32c0cde4e2d1343dfb88a67b2ec6397705b32b upstream. get_char was erroneously given the address of the pointer to the text instead of the address of the text, thus leading to random crashes when the user requests speaking a word while the current position is on a space character and say_word_ctl is not enabled. Reported-on: https://github.com/bytefire/speakup/issues/1 Reported-by: Kirk Reiser <kirk@reisers.ca> Reported-by: Janina Sajka <janina@rednote.net> Reported-by: Alexandr Epaneshnikov <aarnaarn2@gmail.com> Reported-by: Gregory Nowak <greg@gregn.net> Reported-by: deedra waters <deedra@the-brannons.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Tested-by: Alexandr Epaneshnikov <aarnaarn2@gmail.com> Tested-by: Gregory Nowak <greg@gregn.net> Tested-by: Michael Taboada <michael@michaels.world> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200306003047.thijtmqrnayd3dmw@function Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/speakup/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 63c59bc89b04..3b465c18d7b7 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -562,8 +562,7 @@ static u_long get_word(struct vc_data *vc)
return 0;
} else if ((tmpx < vc->vc_cols - 2)
&& (ch == SPACE || ch == 0 || IS_WDLM(ch))
- && ((char)get_char(vc, (u_short *) &tmp_pos + 1, &temp) >
- SPACE)) {
+ && ((char)get_char(vc, (u_short *)tmp_pos + 1, &temp) > SPACE)) {
tmp_pos += 2;
tmpx++;
} else