parent
6ce5e722f1
commit
493e9b2614
4 changed files with 24 additions and 15 deletions
@ -1,16 +1,15 @@ |
||||
#include <cstddef> |
||||
#include <cstdint> |
||||
#include <cstdlib> |
||||
|
||||
#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<const char*>(data), size); |
||||
upb::Arena arena; |
||||
google_protobuf_FileDescriptorProto_parsenew(strview, arena.ptr()); |
||||
google_protobuf_FileDescriptorProto_parse(reinterpret_cast<const char*>(data), |
||||
size, arena.ptr()); |
||||
return 0; |
||||
} |
||||
|
||||
#ifndef HAVE_FUZZER |
||||
int main() {} |
||||
#endif |
||||
|
Loading…
Reference in new issue