blob: 8ecc6f0b2f8dbf7913f9980063bef204538a1135 [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
#include "smbprovider/netbios_packet_parser.h"
namespace {
void FuzzNetBiosParser(const uint8_t* data, size_t size) {
if (size < 2) {
return;
}
const uint16_t transaction_id = (data[0] << 8) | data[1];
const std::vector<uint8_t> packet(data + 2, data + size);
smbprovider::netbios::ParsePacket(packet, transaction_id);
}
} // namespace
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
FuzzNetBiosParser(data, size);
return 0;
}