OpenCloudOS-Kernel/drivers/accessibility/speakup
Dan Carpenter c6e1650cf5 speakup: Fix sizeof() vs ARRAY_SIZE() bug
commit 008ab3c53bc4f0b2f20013c8f6c204a3203d0b8b upstream.

The "buf" pointer is an array of u16 values.  This code should be
using ARRAY_SIZE() (which is 256) instead of sizeof() (which is 512),
otherwise it can the still got out of bounds.

Fixes: c8d2f34ea96e ("speakup: Avoid crash on very long word")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://lore.kernel.org/r/d16f67d2-fd0a-4d45-adac-75ddd11001aa@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-12 11:11:18 +02:00
..
.gitignore speakup: Generate speakupmap.h automatically 2022-06-27 15:15:55 +02:00
DefaultKeyAssignments
Kconfig speakup: add HAS_IOPORT dependency for SPEAKUP_SERIALIO 2023-05-31 19:17:40 +01:00
Makefile speakup: Fix building as extmod 2022-11-23 19:55:03 +01:00
TODO
buffers.c
devsynth.c
fakekey.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
genmap.c speakup: Generate speakupmap.h automatically 2022-06-27 15:15:55 +02:00
i18n.c speakup: use C99 syntax for array initializers 2021-07-21 13:45:53 +02:00
i18n.h speakup: Separate out translations for bright colors names 2021-06-15 17:07:46 +02:00
keyhelp.c
kobjects.c accessibility: speakup: phonetic spelling while arrowing letter by letter 2022-11-23 19:47:15 +01:00
main.c speakup: Fix sizeof() vs ARRAY_SIZE() bug 2024-06-12 11:11:18 +02:00
makemapdata.c speakup: Fix building as extmod 2022-11-23 19:55:03 +01:00
selection.c speakup: Fix clearing selection in safe context 2020-11-09 18:14:20 +01:00
serialio.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
serialio.h serial: Consolidate BOTH_EMPTY use 2022-06-27 14:41:31 +02:00
speakup.h accessibility: speakup: phonetic spelling while arrowing letter by letter 2022-11-23 19:47:15 +01:00
speakup_acnt.h
speakup_acntpc.c Accessiblity: speakup_acntpc: specifying the default driver parameters among the module params 2022-11-23 19:46:27 +01:00
speakup_acntsa.c Accessiblity: speakup_acntsa: specifying the default driver parameters among the module params 2022-11-23 19:46:27 +01:00
speakup_apollo.c Accessiblity: speakup_apollo: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_audptr.c Accessiblity: speakup_audptr: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_bns.c Accessiblity: speakup_bns: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_decext.c Accessiblity: speakup_decext: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_decpc.c Accessiblity: speakup_decpc: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_dectlk.c Accessiblity: speakup_dectlk: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_dtlk.c Accessiblity: speakup_dtlk: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_dtlk.h
speakup_dummy.c Accessiblity: speakup_dummy: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_keypc.c Accessiblity: speakup_keypc: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_ltlk.c Accessiblity: speakup_ltlk: specifying the default driver parameters among the module params 2022-11-23 19:46:27 +01:00
speakup_soft.c Accessiblity: speakup_soft: specifying the default driver parameters among the module params 2022-11-23 19:46:26 +01:00
speakup_spkout.c Accessiblity: speakup_spkout: specifying the default driver parameters among the module params 2022-11-23 19:46:27 +01:00
speakup_txprt.c Accessiblity: speakup_txprt: specifying the default driver parameters among the module params 2022-11-23 19:46:27 +01:00
speakupmap.map
spk_priv.h speakup: add the missing synth parameter to all io functions 2021-01-27 13:12:04 +01:00
spk_priv_keyinfo.h
spk_ttyio.c tty: use u8 for flags 2023-08-11 21:12:45 +02:00
spk_types.h accessibility: speakup: phonetic spelling while arrowing letter by letter 2022-11-23 19:47:15 +01:00
synth.c speakup: Fix 8bit characters from direct synth 2024-04-03 15:28:28 +02:00
thread.c
utils.h speakup: replace utils' u_char with unsigned char 2022-11-09 15:25:24 +01:00
varhandlers.c accessibility: speakup: phonetic spelling while arrowing letter by letter 2022-11-23 19:47:15 +01:00