mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibGfx/OpenType: Fix bound-check
This commit is contained in:
parent
3918a8492b
commit
d5577002d5
Notes:
sideshowbarker
2024-07-17 06:40:21 +09:00
Author: https://github.com/gohai 🔰 Commit: https://github.com/SerenityOS/serenity/commit/d5577002d5 Pull-request: https://github.com/SerenityOS/serenity/pull/17891
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);
|
||||
if (lookup_list_slice.size() < sizeof(LookupList)) {
|
||||
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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue