[varc] Fixups

Seems to work now!
This commit is contained in:
Behdad Esfahbod committed 2024-04-16 17:10:46 -06:00
1 parent 12ad2ff624
commit 72c9deb5f1
2 files changed
+8 -7

No files matched your search

+1 -2
View File
@@ -1462,10 +1462,9 @@ struct CFFIndex
hb_barrier () &&
(count == 0 || /* empty INDEX */
(count < count + 1u &&
hb_barrier () &&
c->check_struct (&offSize) && offSize >= 1 && offSize <= 4 &&
c->check_array (offsets, offSize, count + 1u) &&
c->check_array ((const HBUINT8*) data_base (), 1, offset_at (count))))));
c->check_range (data_base (), offset_at (count))))));
}
public:
+7 -5
View File
@@ -3134,7 +3134,7 @@ struct MultiVarData
hb_array_t<float> out,
SparseVarRegionList::cache_t *cache = nullptr) const
{
auto &deltaSets = StructAfter<TupleList> (regionIndices);
auto &deltaSets = StructAfter<decltype (deltaSetsX)> (regionIndices);
if (unlikely (inner >= deltaSets.count))
return;
@@ -3163,18 +3163,20 @@ struct MultiVarData
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
return_trace (format.sanitize (c) &&
hb_barrier () &&
format == 1 &&
regionIndices.sanitize (c) &&
hb_barrier () &&
StructAfter<CFF2Index> (regionIndices).sanitize (c));
StructAfter<decltype (deltaSetsX)> (regionIndices).sanitize (c));
}
protected:
HBUINT16 format; // 1
HBUINT8 format; // 1
Array16Of<HBUINT16> regionIndices;
TupleList deltaSetsX;
public:
DEFINE_SIZE_MIN (4 + CFF2Index::min_size);
DEFINE_SIZE_MIN (8);
};
struct ItemVariationStore