• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "net/http/http_auth_challenge_tokenizer.h"
11 
12 #include <string_view>
13 
14 #include "net/http/http_util.h"
15 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)16 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
17   std::string_view input(reinterpret_cast<const char*>(data), size);
18   net::HttpAuthChallengeTokenizer tokenizer(input);
19   net::HttpUtil::NameValuePairsIterator parameters = tokenizer.param_pairs();
20   while (parameters.GetNext()) {
21   }
22   tokenizer.base64_param();
23   return 0;
24 }
25