[cff] Try fixing Heap-buffer-overflow in CFF::Charset::collect_glyph_to_sid_map
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47790
This commit is contained in:
parent
356c1f8336
commit
b59e25f25e
|
@ -406,6 +406,8 @@ struct Charset1_2 {
|
|||
void collect_glyph_to_sid_map (hb_map_t *mapping, unsigned int num_glyphs) const
|
||||
{
|
||||
hb_codepoint_t gid = 1;
|
||||
if (gid >= num_glyphs)
|
||||
return;
|
||||
for (unsigned i = 0;; i++)
|
||||
{
|
||||
hb_codepoint_t sid = ranges[i].first;
|
||||
|
|
Loading…
Reference in New Issue