[ubsan] Don't decrease pointer if match_glyph_data is null (#2048)
Similar to fix on https://github.com/harfbuzz/harfbuzz/pull/2022 Fixes https://crbug.com/1023070
This commit is contained in:
parent
878e3588a3
commit
64a45be519
|
@ -363,7 +363,11 @@ struct hb_ot_apply_context_t :
|
||||||
matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0);
|
matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void reject () { num_items++; match_glyph_data--; }
|
void reject ()
|
||||||
|
{
|
||||||
|
num_items++;
|
||||||
|
if (match_glyph_data) match_glyph_data--;
|
||||||
|
}
|
||||||
|
|
||||||
matcher_t::may_skip_t
|
matcher_t::may_skip_t
|
||||||
may_skip (const hb_glyph_info_t &info) const
|
may_skip (const hb_glyph_info_t &info) const
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue