[patch 1/2] speakup: Fix hang on spelling words with non-latin1 characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



9831013cbdbd3d06430a1db01d8c32d50c7d1c04 ('speakup: convert screen reading to
16bit characters') made spell_word() ignore non-latin1 characters now read from
the VC, but it missed actually skipping them, leading to an infinite loop. This fixes it by just advancing the unicode character pointer.

Reported-by: Zahari Yurukov <zahari.yurukov@xxxxxxxxx>
Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Tested-by: Zahari Yurukov <zahari.yurukov@xxxxxxxxx>

Index: linux-2.6/drivers/staging/speakup/main.c
===================================================================
--- linux-2.6.orig/drivers/staging/speakup/main.c
+++ linux-2.6/drivers/staging/speakup/main.c
@@ -718,8 +718,11 @@ static void spell_word(struct vc_data *v
 		return;
 	while ((ch = *cp)) {
 		if (ch >= 0x100)
+		{
 			/* FIXME */
+			cp++;
 			continue;
+		}
 		if (cp != buf)
 			synth_printf(" %s ", delay_str[spk_spell_delay]);
 		if (IS_CHAR(ch, B_CAP)) {

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux