Immutable buffer fix

This commit is contained in:
Simon Cozens authored and Behdad Esfahbod committed 2020-10-09 22:27:55 -06:00
1 parent 150f391438
commit f56eb402f0
1 file changed
+7
+7
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);