Skip to content

[woff2] Disallow zero table font entries

Ben Wagner requested to merge bungeman/freetype:woff2_no_zero_table_fonts into master

The existing code already disallows zero table woff2 overall, but still allows for individual CollectionFontEntry to create font instances with zero tables. Such fonts are not useful so error early.

This also fixes an MSAN discovered issue where if a CollectionFontEntry numTables is zero then the sfnt_header was not fully initialized.

  • src/sfnt/sfwoff2.c (woff2_open_font): error on zero tables, always initalize sfnt_header

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68384

Merge request reports

Loading