convert_woff2ttf_fuzzer_new_entry.cc (441B)
1 #include <string> 2 #include <woff2/decode.h> 3 4 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t data_size) { 5 // Decode using newer entry pattern. 6 // Same pattern as woff2_decompress. 7 std::string output(std::min(woff2::ComputeWOFF2FinalSize(data, data_size), 8 woff2::kDefaultMaxSize), 0); 9 woff2::WOFF2StringOut out(&output); 10 woff2::ConvertWOFF2ToTTF(data, data_size, &out); 11 return 0; 12 }