Skip to content

Commit 9d32c0c

Browse files
sthibaulgregkh
authored andcommitted
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: bytefire/speakup#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]>
1 parent f8788d8 commit 9d32c0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/speakup/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ static u_long get_word(struct vc_data *vc)
561561
return 0;
562562
} else if (tmpx < vc->vc_cols - 2 &&
563563
(ch == SPACE || ch == 0 || (ch < 0x100 && IS_WDLM(ch))) &&
564-
get_char(vc, (u_short *)&tmp_pos + 1, &temp) > SPACE) {
564+
get_char(vc, (u_short *)tmp_pos + 1, &temp) > SPACE) {
565565
tmp_pos += 2;
566566
tmpx++;
567567
} else {

0 commit comments

Comments
 (0)