http_content_disposition_fuzzer.cc 600 B

123456789101112131415161718
  1. // Copyright 2019 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 <cstddef>
  5. #include <cstdint>
  6. #include <fuzzer/FuzzedDataProvider.h>
  7. #include "net/http/http_content_disposition.h"
  8. extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  9. FuzzedDataProvider input{data, size};
  10. auto charset = input.ConsumeRandomLengthString(100u);
  11. auto header = input.ConsumeRemainingBytesAsString();
  12. net::HttpContentDisposition content_disposition{header, charset};
  13. return 0;
  14. }