Skip to content

[cff] Rework the stream limit checks.

Alexei Podtelezhnikov requested to merge cff-limit-check into master

The old stream limit checks, before 6986ddac, were good but pointless for crafted t2_strings. Checking limits their is not necessary as they are created to hold all data. By using two conditions, we can detect the actual crossing of the stream boundary as appropriate for the stream pointer only. The t2_strings parsing will not be triggering these checks.

  • src/cff/cffparse.c (cff_parser_within_limits): Removed. (cff_parse_real, cff_parse_integer): Redesign the stream limit check. (cff_parse_num, do fixed, cff_parse_fixed_dynamic): Update callers.

Merge request reports