1 // Copyright 2020 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 "discovery/common/config.h"
6 #include "discovery/mdns/mdns_reader.h"
7 
8 namespace openscreen {
9 namespace discovery {
Fuzz(const uint8_t * data,size_t size)10 void Fuzz(const uint8_t* data, size_t size) {
11   MdnsReader reader(Config{}, data, size);
12   reader.Read();
13 }
14 }  // namespace discovery
15 }  // namespace openscreen
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)16 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
17   openscreen::discovery::Fuzz(data, size);
18   return 0;
19 }
20