blob: 686921b93b257973cbcc20caa9160e8e123f9931 [file] [log] [blame]
krasin89ae30be2015-10-21 01:37:431// Copyright (c) 2015 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
5#include "net/ftp/ftp_ctrl_response_buffer.h"
6#include "net/log/net_log.h"
7
8// Entry point for LibFuzzer.
krasinf45d5292015-10-22 01:46:229extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data,
10 unsigned long size) {
krasin89ae30be2015-10-21 01:37:4311 const net::BoundNetLog log;
12 net::FtpCtrlResponseBuffer buffer(log);
13 if (!buffer.ConsumeData(reinterpret_cast<const char*>(data), size)) {
krasinf45d5292015-10-22 01:46:2214 return 0;
krasin89ae30be2015-10-21 01:37:4315 }
16 while (buffer.ResponseAvailable()) {
17 (void)buffer.PopResponse();
18 }
krasinf45d5292015-10-22 01:46:2219 return 0;
krasin89ae30be2015-10-21 01:37:4320}