kernel_samsung_a53x/drivers/accessibility/speakup
Samuel Thibault b0cfad1b1c speakup: Fix 8bit characters from direct synth
[ Upstream commit b6c8dafc9d86eb77e502bb018ec4105e8d2fbf78 ]

When userland echoes 8bit characters to /dev/synth with e.g.

echo -e '\xe9' > /dev/synth

synth_write would get characters beyond 0x7f, and thus negative when
char is signed.  When given to synth_buffer_add which takes a u16, this
would sign-extend and produce a U+ffxy character rather than U+xy.
Users thus get garbled text instead of accents in their output.

Let's fix this by making sure that we read unsigned characters.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Fixes: 89fc2ae80bb1 ("speakup: extend synth buffer to 16bit unicode characters")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240204155736.2oh4ot7tiaa2wpbh@begin
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 09:22:34 +01:00
..
buffers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
DefaultKeyAssignments Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devsynth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fakekey.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i18n.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i18n.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyhelp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kobjects.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
selection.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serialio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serialio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_acnt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_acntpc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_acntsa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_apollo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_audptr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_bns.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_decext.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_decpc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_dectlk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_dtlk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_dtlk.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_dummy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_keypc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_ltlk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_soft.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_spkout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakup_txprt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakupmap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
speakupmap.map Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spk_priv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spk_priv_keyinfo.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spk_ttyio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spk_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synth.c speakup: Fix 8bit characters from direct synth 2024-11-19 09:22:34 +01:00
thread.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
TODO Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
varhandlers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00