blob: 3cee91ef6faf7afaf9727b7cd642181a305127b7 [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.
mmorozfa4495442015-11-26 14:07:499extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) {
krasin89ae30be2015-10-21 01:37:4310 const net::BoundNetLog log;
11 net::FtpCtrlResponseBuffer buffer(log);
12 if (!buffer.ConsumeData(reinterpret_cast<const char*>(data), size)) {
krasinf45d5292015-10-22 01:46:2213 return 0;
krasin89ae30be2015-10-21 01:37:4314 }
15 while (buffer.ResponseAvailable()) {
16 (void)buffer.PopResponse();
17 }
krasinf45d5292015-10-22 01:46:2218 return 0;
krasin89ae30be2015-10-21 01:37:4319}