linux/drivers/accessibility
Dan Carpenter 504178fb7d 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>
2024-06-16 13:39:11 +02:00
..
braille Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
speakup speakup: Fix sizeof() vs ARRAY_SIZE() bug 2024-06-16 13:39:11 +02:00
Kconfig staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
Makefile staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00