mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 23:41:03 +01:00
[morx/kerx] Fix sanitize regression
Broke in 8dcc1913a1
If sanitizer is left with another object, it wouldn't work.
Better fix coming soon.
This commit is contained in:
1 parent
3cc14e78ae
commit
20edc70d53
2 files changed
+2
-8
No files matched your search
@@ -962,11 +962,9 @@ struct KerxTable
|
||||
unsigned int count = thiz()->tableCount;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
c->reset_object ();
|
||||
if (unlikely (!st->u.header.sanitize (c)))
|
||||
{
|
||||
c->reset_object ();
|
||||
return_trace (false);
|
||||
}
|
||||
/* OpenType kern table has 2-byte subtable lengths. That's limiting.
|
||||
* MS implementation also only supports one subtable, of format 0,
|
||||
* anyway. Certain versions of some fonts, like Calibry, contain
|
||||
@@ -976,8 +974,6 @@ struct KerxTable
|
||||
* the length for the last subtable. */
|
||||
if (i < count - 1)
|
||||
c->set_object (*st);
|
||||
else
|
||||
c->reset_object ();
|
||||
|
||||
if (unlikely (!st->sanitize (c)))
|
||||
return_trace (false);
|
||||
|
||||
@@ -1061,11 +1061,9 @@ struct Chain
|
||||
unsigned int count = subtableCount;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
c->reset_object ();
|
||||
if (unlikely (!c->check_struct (subtable)))
|
||||
{
|
||||
c->reset_object ();
|
||||
return_trace (false);
|
||||
}
|
||||
c->set_object (*subtable);
|
||||
if (!subtable->sanitize (c))
|
||||
return_trace (false);
|
||||
|
||||
Reference in new issue
Block a user