diff --git a/projects/libprotobuf-mutator/Dockerfile b/projects/libprotobuf-mutator/Dockerfile index 5791cd2b7..dfbcc2a0f 100644 --- a/projects/libprotobuf-mutator/Dockerfile +++ b/projects/libprotobuf-mutator/Dockerfile @@ -21,5 +21,4 @@ RUN apt-get install -y make autoconf automake libtool pkg-config cmake ninja-bui RUN git clone --depth 1 https://github.com/google/libprotobuf-mutator.git WORKDIR libprotobuf-mutator -COPY build.sh $SRC/ -COPY libxml2* $SRC/ +COPY build.sh *.dict *.options $SRC/ diff --git a/projects/libprotobuf-mutator/build.sh b/projects/libprotobuf-mutator/build.sh index f84bd9dfe..12dfd20cd 100755 --- a/projects/libprotobuf-mutator/build.sh +++ b/projects/libprotobuf-mutator/build.sh @@ -16,7 +16,7 @@ # ################################################################################ -cp $SRC/*.options $OUT/ +cp -f $SRC/*.dict $SRC/*.options $OUT/ mkdir -p build pushd build @@ -24,7 +24,10 @@ rm -rf * cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release \ -DLIB_PROTO_MUTATOR_WITH_ASAN=OFF \ -DLIB_PROTO_MUTATOR_FUZZER_LIBRARIES=FuzzingEngine -ninja libxml2_example && cp libxml2_example $OUT/ +ninja libxml2_example +cp -f libxml2_example $OUT/ +cp -f libxml2_example $OUT/libxml2_small +cp -f libxml2_example $OUT/libxml2_dict popd # Experimental fuzzer to compare coverage with default one. @@ -35,7 +38,8 @@ rm -rf * cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release \ -DLIB_PROTO_MUTATOR_WITH_ASAN=OFF \ -DLIB_PROTO_MUTATOR_FUZZER_LIBRARIES=FuzzingEngine -ninja libxml2_example && cp libxml2_example $OUT/libxml2_experiment +ninja libxml2_example +cp -f libxml2_example $OUT/libxml2_experiment popd diff --git a/projects/libprotobuf-mutator/libxml2_dict.options b/projects/libprotobuf-mutator/libxml2_dict.options new file mode 100644 index 000000000..182891214 --- /dev/null +++ b/projects/libprotobuf-mutator/libxml2_dict.options @@ -0,0 +1,3 @@ +[libfuzzer] +dict = xml.dict +max_len=1000 diff --git a/projects/libprotobuf-mutator/libxml2_small.options b/projects/libprotobuf-mutator/libxml2_small.options new file mode 100644 index 000000000..278c68111 --- /dev/null +++ b/projects/libprotobuf-mutator/libxml2_small.options @@ -0,0 +1,2 @@ +[libfuzzer] +max_len=1000 diff --git a/projects/libprotobuf-mutator/xml.dict b/projects/libprotobuf-mutator/xml.dict new file mode 100644 index 000000000..35cf8de3d --- /dev/null +++ b/projects/libprotobuf-mutator/xml.dict @@ -0,0 +1,64 @@ +# Copyright 2017 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. +# +################################################################################ + +"" +"" +"&a;" +"<" +"1.0" +"ANY" +"ATTLIST" +"CDATA" +"DOCTYPE" +"EBCDIC" +"ELEMENT" +"EMPTY" +"ENTITIES" +"ENTITY" +"FIXED" +"ID" +"IDREF" +"IDREFS" +"IGNORE" +"IMPLIED" +"INCLUDE" +"ISO-8859-1" +"NDATA" +"NMTOKENS" +"NOTATION" +"PCDATA" +"PUBLIC" +"REQUIRED" +"SYSTEM" +"UCS-4" +"US-ASCII" +"UTF-16" +"UTF-16BE" +"UTF-16LE" +"UTF-8" +"\"http://www.w3.org/1999/xhtml\"" +"\"http://www.w3.org/2000/xmlns\"" +"\"http://www.w3.org/XML/1998/namespace\"" +"fallback" +"http://" +"https://" +"include" +"schema" +"xml" +"xml:lang" +"xml:space" +"xmlns" +"xmlns:"