grub2/grub-core/normal
Daniel Axtens 557370849b normal/charset: Fix array out-of-bounds formatting unicode for display
In some cases attempting to display arbitrary binary strings leads
to ASAN splats reading the widthspec array out of bounds.

Check the index. If it would be out of bounds, return a width of 1.
I don't know if that's strictly correct, but we're not really expecting
great display of arbitrary binary data, and it's certainly not worse than
an OOB read.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2022-06-08 12:41:03 +02:00
..
auth.c core: use GRUB_TERM_ definitions when handling term characters 2017-08-07 19:28:22 +02:00
autofs.c verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
charset.c normal/charset: Fix array out-of-bounds formatting unicode for display 2022-06-08 12:41:03 +02:00
cmdline.c malloc: Use overflow checking primitives where we do complex allocations 2020-07-29 16:55:47 +02:00
color.c Replace explicit sizeof divisions by ARRAY_SIZE. 2015-01-21 17:37:31 +01:00
completion.c normal/completion: Fix leaking of memory when processing a completion 2021-03-02 15:54:17 +01:00
context.c normal: fix memory leak 2015-06-20 23:38:19 +03:00
crypto.c verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
dyncmd.c verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
main.c Add configure option to reduce visual clutter at boot time 2021-09-27 20:09:38 +01:00
menu_entry.c malloc: Use overflow checking primitives where we do complex allocations 2020-07-29 16:55:47 +02:00
menu_text.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
menu.c Add configure option to bypass boot menu if possible 2021-09-27 20:09:38 +01:00
misc.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
term.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00