linux/drivers/accessibility/speakup
Dan Carpenter 3726f75a1c speakup: Fix sizeof() vs ARRAY_SIZE() bug
commit 008ab3c53b 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: c8d2f34ea9 ("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>
History 2024-06-12 11:02:55 +02:00
..
.gitignore speakup: Generate speakupmap.h automatically 2022-06-27 15:15:55 +02:00
buffers.c staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
DefaultKeyAssignments staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
devsynth.c staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
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
Kconfig speakup: only build serialio when ISA is enabled 2020-08-18 13:15:34 +02:00
keyhelp.c staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
kobjects.c staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
main.c speakup: Fix sizeof() vs ARRAY_SIZE() bug 2024-06-12 11:02:55 +02:00
Makefile speakup: Generate speakupmap.h automatically 2022-06-27 15:15:55 +02:00
makemapdata.c speakup: Generate speakupmap.h automatically 2022-06-27 15:15:55 +02: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 speakup: Fix clearing selection in safe context 2020-11-09 18:14:20 +01:00
speakup_acnt.h staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
speakup_acntpc.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_acntsa.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_apollo.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_audptr.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_bns.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_decext.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_decpc.c speakup: add the missing synth parameter to all io functions 2021-01-27 13:12:04 +01:00
speakup_dectlk.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_dtlk.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_dtlk.h staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
speakup_dummy.c speakup-dummy: Add support for PUNCT variable 2022-09-01 16:59:43 +02:00
speakup_keypc.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_ltlk.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_soft.c speakup_soft: Add direct module parameter 2022-09-01 16:59:59 +02:00
speakup_spkout.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakup_txprt.c accessiblity: speakup: cleanup comments 2022-04-20 19:24:00 +02:00
speakupmap.map staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
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 staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
spk_ttyio.c tty: fix possible null-ptr-defer in spk_ttyio_release 2023-01-24 07:24:37 +01:00
spk_types.h speakup: Notify synthesizers of the punctuation level change 2022-09-01 16:59:44 +02:00
synth.c speakup: Fix 8bit characters from direct synth 2024-04-03 15:19:33 +02:00
thread.c staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
TODO staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
utils.h speakup: replace utils' u_char with unsigned char 2022-11-09 15:25:24 +01:00
varhandlers.c speakup: Notify synthesizers of the punctuation level change 2022-09-01 16:59:44 +02:00