aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <[email protected]>2020-03-06 01:30:47 +0100
committerGreg Kroah-Hartman <[email protected]>2020-03-11 08:10:37 +0100
commit9d32c0cde4e2d1343dfb88a67b2ec6397705b32b (patch)
treee2ed01946c07d4711203cd11621a17b67d8397c0
parentf8788d86ab28f61f7b46eb6be375f8a726783636 (diff)
staging/speakup: fix get_word non-space look-ahead
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 <[email protected]> Reported-by: Janina Sajka <[email protected]> Reported-by: Alexandr Epaneshnikov <[email protected]> Reported-by: Gregory Nowak <[email protected]> Reported-by: deedra waters <[email protected]> Signed-off-by: Samuel Thibault <[email protected]> Tested-by: Alexandr Epaneshnikov <[email protected]> Tested-by: Gregory Nowak <[email protected]> Tested-by: Michael Taboada <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/20200306003047.thijtmqrnayd3dmw@function Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/speakup/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 488f2539aa9a..81ecfd1a200d 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -561,7 +561,7 @@ static u_long get_word(struct vc_data *vc)
return 0;
} else if (tmpx < vc->vc_cols - 2 &&
(ch == SPACE || ch == 0 || (ch < 0x100 && IS_WDLM(ch))) &&
- get_char(vc, (u_short *)&tmp_pos + 1, &temp) > SPACE) {
+ get_char(vc, (u_short *)tmp_pos + 1, &temp) > SPACE) {
tmp_pos += 2;
tmpx++;
} else {