grub2/include
Zhang Boyang afa02a1bb2 normal/charset: Fix an integer overflow in grub_unicode_aglomerate_comb()
The out->ncomb is a bit-field of 8 bits. So, the max possible value is 255.
However, code in grub_unicode_aglomerate_comb() doesn't check for an
overflow when incrementing out->ncomb. If out->ncomb is already 255,
after incrementing it will get 0 instead of 256, and cause illegal
memory access in subsequent processing.

This patch introduces GRUB_UNICODE_NCOMB_MAX to represent the max
acceptable value of ncomb. The code now checks for this limit and
ignores additional combining characters when limit is reached.

Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Zhang Boyang <zhangboyang.id@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2022-11-12 22:51:49 +00:00
..
grub normal/charset: Fix an integer overflow in grub_unicode_aglomerate_comb() 2022-11-12 22:51:49 +00:00
xen xen: Setup hypercall page for PVH 2018-12-12 12:03:27 +01:00
multiboot2.h multiboot: disentangle multiboot and multiboot2. 2017-08-14 14:08:54 +02:00
multiboot.h Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00