1 // Copyright 2018 The Fuchsia 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 <stddef.h>
6 #include <stdint.h>
7 #include <limits.h>
8 
9 #include <lib/edid/edid.h>
10 
11 // fuzz_target.cc
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
13     edid::Edid test;
14     const char *err_msg;
15     if (size < UINT16_MAX) {
16         test.Init(data, static_cast<uint16_t>(size), &err_msg);
17     }
18     return 0;
19 }
20