diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
| commit | d2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch) | |
| tree | e2703384779e83312c456399999997fcc289c5cf /testfiles/fuzzer.cpp | |
| parent | Merge branch 'master' into powerpencil (diff) | |
| parent | change assignment to equality (diff) | |
| download | inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip | |
Merge branch 'master' into powerpencil
Diffstat (limited to 'testfiles/fuzzer.cpp')
| -rw-r--r-- | testfiles/fuzzer.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testfiles/fuzzer.cpp b/testfiles/fuzzer.cpp new file mode 100644 index 000000000..6dd09e753 --- /dev/null +++ b/testfiles/fuzzer.cpp @@ -0,0 +1,15 @@ +#include "xml/repr.h" +#include "inkscape.h" +#include "document.h" + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + g_type_init(); + Inkscape::GC::init(); + if ( !Inkscape::Application::exists() ) + Inkscape::Application::create("", false); + //void* a= sp_repr_read_mem((const char*)data, size, 0); + SPDocument *doc = SPDocument::createNewDocFromMem( (const char*)data, size, 0); + if(doc) + doc->doUnref(); + return 0; +} |
