提交 aca378f5 编写于 作者: B Behdad Esfahbod

Sanitize (Headless)ArrayOf()::len to ensure it doesn't use offsets

上级 5f047113
......@@ -946,7 +946,7 @@ struct ArrayOf
inline bool sanitize_shallow (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && c->check_array (array, Type::static_size, len));
return_trace (len.sanitize (c) && c->check_array (array, Type::static_size, len));
}
public:
......@@ -1033,7 +1033,7 @@ struct HeadlessArrayOf
inline bool sanitize_shallow (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
return_trace (len.sanitize (c) &&
(!len || c->check_array (array, Type::static_size, len - 1)));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册