Merge pull request #186 from Google-Autofuzz/master
Add Fuzz target and modified BUILDpull/13171/head
commit
6ce5e722f1
2 changed files with 30 additions and 0 deletions
@ -0,0 +1,16 @@ |
||||
#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()); |
||||
return 0; |
||||
} |
Loading…
Reference in new issue