summaryrefslogtreecommitdiff
path: root/test/fuzzers
diff options
context:
space:
mode:
authordavkor <david@adalogics.com>2020-08-13 17:12:44 +0100
committerRich Trott <rtrott@gmail.com>2020-08-15 14:59:07 -0700
commit375b859428e1c525f0cc9d3c4324f51740316722 (patch)
tree6f193b56793b3ed58522ecee321d732a69b3c54b /test/fuzzers
parent5d179cb2eccac38205b6f03ecf6403df65deea51 (diff)
downloadnode-new-375b859428e1c525f0cc9d3c4324f51740316722.tar.gz
build: add build flag for OSS-Fuzz integration
Refs: https://github.com/google/oss-fuzz/pull/3860 Fixes: https://github.com/nodejs/node/issues/33724 PR-URL: https://github.com/nodejs/node/pull/34761 Fixes: https://github.com/nodejs/node/issues/33724 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/fuzzers')
-rw-r--r--test/fuzzers/fuzz_url.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/fuzzers/fuzz_url.cc b/test/fuzzers/fuzz_url.cc
new file mode 100644
index 0000000000..16c5f64489
--- /dev/null
+++ b/test/fuzzers/fuzz_url.cc
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+
+#include "node.h"
+#include "node_internals.h"
+#include "node_url.h"
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ node::url::URL url2(reinterpret_cast<const char*>(data), size);
+
+ return 0;
+}