From e25c754918ae26e8b9e68a47bc1af36248e91800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 12 Jul 2019 09:18:14 +0200 Subject: New upstream version 6.9.2 --- contributed/libfuzzer-onig.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'contributed/libfuzzer-onig.cpp') diff --git a/contributed/libfuzzer-onig.cpp b/contributed/libfuzzer-onig.cpp index dcd7c63..e137b73 100644 --- a/contributed/libfuzzer-onig.cpp +++ b/contributed/libfuzzer-onig.cpp @@ -3,14 +3,14 @@ Usage: * compile oniguruma with something like - ./configure CC=clang LD=clang CFLAGS="-fsanitize-coverage=edge -fsanitize=address" \ - LDFLAGS="-fsanitize-coverage=edge -fsanitize=address" + ./configure CC=clang LD=clang CFLAGS="-fsanitize-coverage=edge -fsanitize=address" \ + LDFLAGS="-fsanitize-coverage=edge -fsanitize=address" * Compile libfuzzer stub and link against static libonig.a and libFuzzer.a: - clang++ libfuzzer-onig.cpp src/.libs/libonig.a libFuzzer.a -o libfuzzer-onig \ - -fsanitize-coverage=edge -fsanitize=address + clang++ libfuzzer-onig.cpp src/.libs/libonig.a libFuzzer.a -o libfuzzer-onig \ + -fsanitize-coverage=edge -fsanitize=address * Put sample patterns in directory "in/" * Run - ./libfuzzer-onig in + ./libfuzzer-onig in Consult libfuzzer docs for further details and how to create libFuzzer.a: http://llvm.org/docs/LibFuzzer.html @@ -22,7 +22,7 @@ http://llvm.org/docs/LibFuzzer.html extern "C" int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) { - regex_t *reg; + regex_t *reg; OnigEncoding enc; enc = ONIG_ENCODING_UTF8; @@ -31,13 +31,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) onig_initialize(&enc, 1); #endif - if (onig_new(®, Data, Data + Size, ONIG_OPTION_DEFAULT, enc, + if (onig_new(®, Data, Data + Size, ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, 0) == 0) - onig_free(reg); + onig_free(reg); #ifdef FULL_TEST onig_end(); #endif - return 0; + return 0; } -- cgit v1.2.3