提交 6caf76f4 编写于 作者: B Behdad Esfahbod

Tighten Coverage iteration

上级 ff3a7ce1
......@@ -1002,9 +1002,12 @@ struct CoverageFormat2
unsigned int old = coverage;
j = c->rangeRecord[i].start;
coverage = c->rangeRecord[i].value;
if (unlikely (coverage <= old))
if (unlikely (coverage != old + 1))
{
/* Broken table. Skip. Important to avoid DoS. */
/* Broken table. Skip. Important to avoid DoS.
* Also, our callers depend on coverage being
* consecutive and monotonically increasing,
* ie. iota(). */
i = c->rangeRecord.len;
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册