mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:47:45 +00:00
LibGfx/OpenType: Fix bound-check
This commit is contained in:
parent
3918a8492b
commit
d5577002d5
1 changed files with 1 additions and 0 deletions
|
@ -1005,6 +1005,7 @@ Optional<i16> GPOS::glyph_kerning(u16 left_glyph_id, u16 right_glyph_id) const
|
||||||
auto lookup_list_slice = m_slice.slice(header.lookup_list_offset);
|
auto lookup_list_slice = m_slice.slice(header.lookup_list_offset);
|
||||||
if (lookup_list_slice.size() < sizeof(LookupList)) {
|
if (lookup_list_slice.size() < sizeof(LookupList)) {
|
||||||
dbgln_if(OPENTYPE_GPOS_DEBUG, "GPOS table lookup list slice is too small");
|
dbgln_if(OPENTYPE_GPOS_DEBUG, "GPOS table lookup list slice is too small");
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
auto const& lookup_list = *bit_cast<LookupList const*>(lookup_list_slice.data());
|
auto const& lookup_list = *bit_cast<LookupList const*>(lookup_list_slice.data());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue