提交 480406cd 编写于 作者: B Behdad Esfahbod

Fix assertion on address overflow

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=917031
上级 7a6686a5
......@@ -269,9 +269,10 @@ struct hb_sanitize_context_t :
const char *obj_start = (const char *) obj;
const char *obj_end = (const char *) obj + obj->get_size ();
assert (obj_start <= obj_end); /* Must not overflow. */
if (unlikely (obj_end < this->start || this->end < obj_start))
if (unlikely (obj_end < obj_start /* Overflow. */ ||
obj_end < this->start ||
this->end < obj_start))
this->start = this->end = nullptr;
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册