Immutable buffer fix

This commit is contained in:
Simon Cozens 2020-09-25 10:06:33 +01:00 committed by Behdad Esfahbod
parent 150f391438
commit f56eb402f0
1 changed files with 7 additions and 0 deletions

View File

@ -776,6 +776,13 @@ hb_buffer_deserialize_unicode (hb_buffer_t *buffer,
assert ((!buffer->len && (buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)) ||
(buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE));
if (unlikely (hb_object_is_immutable (buffer)))
{
*end_ptr = buf;
return false;
}
if (buf_len == -1)
buf_len = strlen (buf);