diff options
author | Nikias Bassen <nikias@gmx.li> | 2017-04-25 16:57:05 +0200 |
---|---|---|
committer | Abhishek Arya <inferno@chromium.org> | 2017-04-25 07:57:05 -0700 |
commit | d0f51f58738cced1f5a2ce2a455497fb7507cc1a (patch) | |
tree | 676b0fd94503c954b6874e7a2a962c017d6850ee /projects/libplist | |
parent | 7048a709c0128dcf454072166341c27788532f52 (diff) | |
download | oss-fuzz-d0f51f58738cced1f5a2ce2a455497fb7507cc1a.tar.gz |
libplist: Move fuzzing targets to project repository (#549)
Diffstat (limited to 'projects/libplist')
-rw-r--r-- | projects/libplist/Dockerfile | 4 | ||||
-rw-r--r-- | projects/libplist/bplist.dict | 1 | ||||
-rw-r--r-- | projects/libplist/bplist_fuzzer.cc | 29 | ||||
-rw-r--r-- | projects/libplist/bplist_fuzzer.options | 3 | ||||
-rwxr-xr-x | projects/libplist/build.sh | 8 | ||||
-rw-r--r-- | projects/libplist/xplist.dict | 65 | ||||
-rw-r--r-- | projects/libplist/xplist_fuzzer.cc | 29 | ||||
-rw-r--r-- | projects/libplist/xplist_fuzzer.options | 3 |
8 files changed, 4 insertions, 138 deletions
diff --git a/projects/libplist/Dockerfile b/projects/libplist/Dockerfile index a8527b6f2..2ca32f689 100644 --- a/projects/libplist/Dockerfile +++ b/projects/libplist/Dockerfile @@ -22,7 +22,3 @@ RUN git clone --depth 1 https://github.com/libimobiledevice/libplist WORKDIR libplist COPY build.sh $SRC/ -COPY bplist_fuzzer.* \ - xplist_fuzzer.* \ - bplist.dict \ - xplist.dict $SRC/ diff --git a/projects/libplist/bplist.dict b/projects/libplist/bplist.dict deleted file mode 100644 index bb0ea5d7b..000000000 --- a/projects/libplist/bplist.dict +++ /dev/null @@ -1 +0,0 @@ -header_bplist = "bplist00" diff --git a/projects/libplist/bplist_fuzzer.cc b/projects/libplist/bplist_fuzzer.cc deleted file mode 100644 index 6eca272aa..000000000 --- a/projects/libplist/bplist_fuzzer.cc +++ /dev/null @@ -1,29 +0,0 @@ -/* -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -*/ - -#include <plist/plist.h> -#include <stdio.h> - -extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) -{ - plist_t root_node = NULL; - plist_from_bin(reinterpret_cast<const char*>(data), size, &root_node); - plist_free(root_node); - - return 0; -} diff --git a/projects/libplist/bplist_fuzzer.options b/projects/libplist/bplist_fuzzer.options deleted file mode 100644 index c0689b213..000000000 --- a/projects/libplist/bplist_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 4096 -dict = bplist.dict diff --git a/projects/libplist/build.sh b/projects/libplist/build.sh index 7a236cce2..fc73b0266 100755 --- a/projects/libplist/build.sh +++ b/projects/libplist/build.sh @@ -22,11 +22,11 @@ make -j$(nproc) all for fuzzer in bplist_fuzzer xplist_fuzzer; do $CXX $CXXFLAGS -std=c++11 -Iinclude/ \ - $SRC/$fuzzer.cc -o $OUT/$fuzzer \ + fuzz/$fuzzer.cc -o $OUT/$fuzzer \ -lFuzzingEngine src/.libs/libplist.a done -zip -j $OUT/bplist_fuzzer_seed_corpus.zip $SRC/libplist/test/data/*.bplist -zip -j $OUT/xplist_fuzzer_seed_corpus.zip $SRC/libplist/test/data/*.plist +zip -j $OUT/bplist_fuzzer_seed_corpus.zip test/data/*.bplist +zip -j $OUT/xplist_fuzzer_seed_corpus.zip test/data/*.plist -cp $SRC/*.dict $SRC/*.options $OUT/ +cp fuzz/*.dict fuzz/*.options $OUT/ diff --git a/projects/libplist/xplist.dict b/projects/libplist/xplist.dict deleted file mode 100644 index eba40aeba..000000000 --- a/projects/libplist/xplist.dict +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# -# AFL dictionary for XML Property Lists -# ---------------------- -# -# Several basic syntax elements and attributes for libplist. -# -# Created by Nikias Bassen <nikias@gmx.li> -# Adapted from libxml2's dict file (created by Michal Zalewski <lcamtuf@google.com>) -# - -attr_encoding=" encoding=\"1\"" -attr_generic=" a=\"1\"" -attr_version=" version=\"1\"" - -entity_builtin="<" -entity_decimal="" -entity_external="&a;" -entity_hex="" - -string_cdata="CDATA" -string_dashes="--" -string_empty="EMPTY" -string_empty_dblquotes="\"\"" -string_empty_quotes="''" -string_parentheses="()" -string_pcdata="#PCDATA" -string_percent="%a" -string_public="PUBLIC" -string_utf8="UTF-8" - -tag_cdata="<![CDATA[" -tag_close="</plist>" -tag_doctype="<!DOCTYPE" -tag_open="<plist>" -tag_open_close="<plist />" -tag_open_exclamation="<!" -tag_open_q="<?" -tag_sq2_close="]]>" -tag_xml_q="<?xml?>" -tag_array="<array>" -tag_data="<data>" -tag_date="<date>" -tag_dict="<dict>" -tag_false="<false/>" -tag_integer="<integer>" -tag_key="<key>" -tag_plist="<plist>" -tag_real="<real>" -tag_string="<string>" -tag_true="<true/>" diff --git a/projects/libplist/xplist_fuzzer.cc b/projects/libplist/xplist_fuzzer.cc deleted file mode 100644 index 50258eec5..000000000 --- a/projects/libplist/xplist_fuzzer.cc +++ /dev/null @@ -1,29 +0,0 @@ -/* -# Copyright 2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -*/ - -#include <plist/plist.h> -#include <stdio.h> - -extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) -{ - plist_t root_node = NULL; - plist_from_xml(reinterpret_cast<const char*>(data), size, &root_node); - plist_free(root_node); - - return 0; -} diff --git a/projects/libplist/xplist_fuzzer.options b/projects/libplist/xplist_fuzzer.options deleted file mode 100644 index bad5dac74..000000000 --- a/projects/libplist/xplist_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 4096 -dict = xplist.dict |