http_security_headers_hsts_fuzzer.cc 550 B

123456789101112131415161718
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include <stddef.h>
  5. #include <stdint.h>
  6. #include <string>
  7. #include "base/time/time.h"
  8. #include "net/http/http_security_headers.h"
  9. extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  10. std::string input(data, data + size);
  11. base::TimeDelta max_age;
  12. bool include_subdomains = false;
  13. net::ParseHSTSHeader(input, &max_age, &include_subdomains);
  14. return 0;
  15. }