xref: /aosp_15_r20/external/cronet/net/http/http_auth_challenge_tokenizer_fuzzer.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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 #include <string>
6 
7 #include "net/http/http_auth_challenge_tokenizer.h"
8 #include "net/http/http_util.h"
9 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)10 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
11   std::string input(reinterpret_cast<const char*>(data), size);
12   net::HttpAuthChallengeTokenizer tokenizer(input.begin(), input.end());
13   net::HttpUtil::NameValuePairsIterator parameters = tokenizer.param_pairs();
14   while (parameters.GetNext()) {
15   }
16   tokenizer.base64_param();
17   return 0;
18 }
19