提交 258305c2 编写于 作者: B Behdad Esfahbod

[GPOS] Fix div-by-zero

Patch by Jonathan Kew.  Mozilla bug #465728.
上级 2422c4b9
......@@ -345,7 +345,7 @@ struct AnchorMatrix
inline bool sanitize (hb_sanitize_context_t *c, unsigned int cols) {
TRACE_SANITIZE ();
if (!c->check_struct (this)) return false;
if (unlikely (cols >= ((unsigned int) -1) / rows)) return false;
if (unlikely (rows > 0 && cols >= ((unsigned int) -1) / rows)) return false;
unsigned int count = rows * cols;
if (!c->check_array (matrix, matrix[0].static_size, count)) return false;
for (unsigned int i = 0; i < count; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册