Use class templates for Null objects
authorBehdad Esfahbod <behdad@fb.com>
Tue, 26 Mar 2019 23:18:03 +0000 (16:18 -0700)
committerBehdad Esfahbod <behdad@fb.com>
Tue, 26 Mar 2019 23:23:40 +0000 (16:23 -0700)
commitec2a5dc859b03ceb92518aa992e4e9c053b30534
treec4128bfc0af4d9449995bba7650d1a912c126245
parent96f12377942dbe1c6b1d0ffa7d626d99cb265443
Use class templates for Null objects

This allows partial-instantiating custom Null object for template Lookup<T>.
Before, this had to be handcoded per instantiation.  Apparently I missed
adding one for AAT::ankr.lookupTable, so it was getting the wrong (generic)
null for Lookup object, which is wrong and unsafe.

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=944346
src/hb-aat-layout-common.hh
src/hb-null.hh
test/fuzzing/fonts/clusterfuzz-testcase-minimized-harfbuzz_fuzzer-5748102301614080 [new file with mode: 0644]