mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-08-30 07:42:27 +02:00
Add underflow detection to TTF cmap code.
This commit is contained in:
@@ -21,6 +21,12 @@ v1.6.0 - YYYY-MM-DD
|
|||||||
(Issue #104)
|
(Issue #104)
|
||||||
|
|
||||||
|
|
||||||
|
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
@@ -1379,7 +1379,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