usb_descriptors_fuzzer.cc 455 B

12345678910111213141516
  1. // Copyright 2016 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. #include <stddef.h>
  5. #include <stdint.h>
  6. #include <vector>
  7. #include "services/device/usb/usb_descriptors.h"
  8. extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  9. device::UsbDeviceDescriptor desc;
  10. desc.Parse(std::vector<uint8_t>(data, data + size));
  11. return 0;
  12. }