From 493e9b2614df79728deb40d5ec91edefa91a89c7 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 17 Jun 2019 12:50:45 -0700 Subject: Build fixes from fuzz target. --- tests/file_descriptor_parsenew_fuzzer.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tests/file_descriptor_parsenew_fuzzer.cc') diff --git a/tests/file_descriptor_parsenew_fuzzer.cc b/tests/file_descriptor_parsenew_fuzzer.cc index 4166469..057e62d 100644 --- a/tests/file_descriptor_parsenew_fuzzer.cc +++ b/tests/file_descriptor_parsenew_fuzzer.cc @@ -1,16 +1,15 @@ -#include #include -#include #include "google/protobuf/descriptor.upb.h" -#include "upb/def.h" -#include "upb/msg.h" #include "upb/upb.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - upb_strview strview = - upb_strview_make(reinterpret_cast(data), size); upb::Arena arena; - google_protobuf_FileDescriptorProto_parsenew(strview, arena.ptr()); + google_protobuf_FileDescriptorProto_parse(reinterpret_cast(data), + size, arena.ptr()); return 0; } + +#ifndef HAVE_FUZZER +int main() {} +#endif -- cgit v1.2.3