mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 23:11:04 +01:00
[Coverage/ClassDef] Handle glyphID overflow in serialize
This commit is contained in:
1 parent
6d7de2f8dd
commit
8df5cdbcda
2 files changed
+15
-1
No files matched your search
@@ -132,7 +132,14 @@ struct Coverage
|
||||
#ifndef HB_NO_BEYOND_64K
|
||||
if (max > 0xFFFFu)
|
||||
u.format += 2;
|
||||
if (unlikely (max > 0xFFFFFFu))
|
||||
#else
|
||||
if (unlikely (max > 0xFFFFu))
|
||||
#endif
|
||||
{
|
||||
c->check_success (false, HB_SERIALIZE_ERROR_INT_OVERFLOW);
|
||||
return_trace (false);
|
||||
}
|
||||
|
||||
switch (u.format)
|
||||
{
|
||||
|
||||
@@ -2101,8 +2101,15 @@ struct ClassDef
|
||||
|
||||
#ifndef HB_NO_BEYOND_64K
|
||||
if (glyph_max > 0xFFFFu)
|
||||
format += 2;
|
||||
u.format += 2;
|
||||
if (unlikely (glyph_max > 0xFFFFFFu))
|
||||
#else
|
||||
if (unlikely (glyph_max > 0xFFFFu))
|
||||
#endif
|
||||
{
|
||||
c->check_success (false, HB_SERIALIZE_ERROR_INT_OVERFLOW);
|
||||
return_trace (false);
|
||||
}
|
||||
|
||||
u.format = format;
|
||||
|
||||
|
||||
Reference in new issue
Block a user