mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-09-14 07:02:29 +02:00
Add underflow detection to TTF cmap code.
This commit is contained in:
@@ -2,6 +2,12 @@ Changes in PDFio
|
|||||||
================
|
================
|
||||||
|
|
||||||
|
|
||||||
|
v1.5.5 - YYYY-MM-DD
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Fixed TTF cmap underflow error.
|
||||||
|
|
||||||
|
|
||||||
v1.5.4 - 2025-08-26
|
v1.5.4 - 2025-08-26
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
2
ttf.c
2
ttf.c
@@ -1205,7 +1205,7 @@ read_cmap(ttf_t *font) // I - Font
|
|||||||
|
|
||||||
/* language = */ read_ushort(font);
|
/* language = */ read_ushort(font);
|
||||||
|
|
||||||
if (length > (256 + 6))
|
if (length > (256 + 6) || length < 7)
|
||||||
{
|
{
|
||||||
errorf(font, "Bad cmap table length at offset %u.", coffset);
|
errorf(font, "Bad cmap table length at offset %u.", coffset);
|
||||||
return (false);
|
return (false);
|
||||||
|
Reference in New Issue
Block a user