[Coverage] Ensure increasing coverage in iteration
This commit is contained in:
parent
50cd26d394
commit
8303a9b011
|
@ -994,15 +994,15 @@ struct CoverageFormat2
|
||||||
i++;
|
i++;
|
||||||
if (more ())
|
if (more ())
|
||||||
{
|
{
|
||||||
hb_codepoint_t old = j;
|
unsigned int old = coverage;
|
||||||
j = c->rangeRecord[i].start;
|
j = c->rangeRecord[i].start;
|
||||||
if (unlikely (j <= old))
|
coverage = c->rangeRecord[i].value;
|
||||||
|
if (unlikely (coverage <= old))
|
||||||
{
|
{
|
||||||
/* Broken table. Skip. Important to avoid DoS. */
|
/* Broken table. Skip. Important to avoid DoS. */
|
||||||
i = c->rangeRecord.len;
|
i = c->rangeRecord.len;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
coverage = c->rangeRecord[i].value;
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue