1 // Copyright 2016 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifdef UNSAFE_BUFFERS_BUILD 6 // TODO(crbug.com/40284755): Remove this and spanify to fix the errors. 7 #pragma allow_unsafe_buffers 8 #endif 9 10 #include <stddef.h> 11 #include <stdint.h> 12 #include <string> 13 14 #include "base/time/time.h" 15 #include "net/http/http_security_headers.h" 16 LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)17extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 18 std::string input(data, data + size); 19 base::TimeDelta max_age; 20 bool include_subdomains = false; 21 net::ParseHSTSHeader(input, &max_age, &include_subdomains); 22 return 0; 23 } 24