mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 08:42:59 +00:00
[aat] Fix memfail crash
This commit is contained in:
parent
7b8ae3d067
commit
64240602b4
1 changed files with 3 additions and 1 deletions
|
@ -81,6 +81,8 @@ struct hb_aat_scratch_t
|
|||
}
|
||||
void destroy_buffer_glyph_set (hb_bit_set_t *s) const
|
||||
{
|
||||
if (unlikely (!s))
|
||||
return;
|
||||
if (buffer_glyph_set.cmpexch (nullptr, s))
|
||||
return;
|
||||
s->fini ();
|
||||
|
@ -137,7 +139,7 @@ struct hb_aat_apply_context_t :
|
|||
|
||||
void setup_buffer_glyph_set ()
|
||||
{
|
||||
using_buffer_glyph_set = buffer->len >= 4;
|
||||
using_buffer_glyph_set = buffer->len >= 4 && buffer_glyph_set;
|
||||
|
||||
if (using_buffer_glyph_set)
|
||||
buffer->collect_codepoints (*buffer_glyph_set);
|
||||
|
|
Loading…
Add table
Reference in a new issue