1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-30 17:22:17 -07:00

; * src/sfnt.c (sfnt_read_cmap_format_12): Assert there's no overflow.

This commit is contained in:
Eli Zaretskii 2026-05-15 15:00:35 +03:00
parent bf89ee6d07
commit f4c326c378

View file

@ -736,6 +736,7 @@ sfnt_read_cmap_format_12 (int fd,
return NULL;
/* Allocate a buffer of sufficient size. */
eassert (length < UINT32_MAX - sizeof *format12);
format12 = xmalloc (length + sizeof *format12);
format12->format = header->format;
format12->reserved = header->length;