* [subset] Bound CFF2 blend values and serialization fields
Clamp fully pinned Private DICT blend sums before converting to int.
Reject CFF2 Top DICT sizes, variation-store counts, and region indexes
that cannot fit their serialized fields. Check VarRegionList counts
and byte-size multiplication before writing or allocating output.
Keep the CFF2 API regressions and move variation-region serialization
coverage into test-item-varstore. Use hb_always_assert and compact
boundary cases instead of custom macros, command-line selectors,
duplicate controls, and constant-condition checks. Verify that valid
region lists survive serialization and remapping unchanged.
The new CFF2 API regressions fail against unpatched main and pass with
these fixes. All 277 Meson tests pass, including all 133 subset tests.
The item-varstore tests also compile with HB_NO_VAR.
Based on the hardening patch in PR #6532.
Co-Authored-By: Nathan Keys <professor.moody@pm.me>
Assisted-by: OpenAI Codex
* [meson] Link the IUP optimizer into the CFF2 serialization test
The CFF2 serialization test instantiates tuple variations. Its object can
therefore reference iup_delta_optimize even though CFF2 does not enable
IUP optimization. Some compilers retain that reference and fail to link
the test; the local optimized build had eliminated it.
Include the IUP implementation in the test target, as the other tuple
and item varstore tests already do.
Reproduced the undefined reference by compiling the CFF2 test object at
-O0. It links and passes after adding the dependency. All 277 tests pass
with meson test -C build.
Assisted-by: OpenAI Codex
---------
Co-authored-by: Nathan Keys <professor.moody@pm.me>