summaryrefslogtreecommitdiff
path: root/contributed/libfuzzer-onig.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-07-12 09:18:18 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-07-12 09:18:18 +0200
commit5c29b174a11e992dac68553f08645fe4a825c315 (patch)
tree7c72e5a49112a844a53a2c10ef1fda47867aee92 /contributed/libfuzzer-onig.cpp
parent6cac1738b6aebf75b29d225775030d291319f9a2 (diff)
parente25c754918ae26e8b9e68a47bc1af36248e91800 (diff)
Update upstream source from tag 'upstream/6.9.2'
Update to upstream version '6.9.2' with Debian dir a351ad757689417d0ede510a023d625faee8e3e9
Diffstat (limited to 'contributed/libfuzzer-onig.cpp')
-rw-r--r--contributed/libfuzzer-onig.cpp18
1 files changed, 9 insertions, 9 deletions
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(&reg, Data, Data + Size, ONIG_OPTION_DEFAULT, enc,
+ if (onig_new(&reg, 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;
}