-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM gcr.io/oss-fuzz-base/base-builder | ||
|
||
# Install necessary dependencies | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y \ | ||
make \ | ||
autoconf \ | ||
libtool \ | ||
wget | ||
|
||
# Clone necessary repositories | ||
RUN git clone git://git.sv.nongnu.org/freetype/freetype2.git $SRC/freetype2 | ||
RUN git clone https://github.com/unicode-org/text-rendering-tests.git $SRC/TRT | ||
RUN wget https://github.com/libarchive/libarchive/releases/download/v3.4.3/libarchive-3.4.3.tar.xz -P $SRC/ | ||
|
||
# Copy all files into $SRC directory | ||
COPY * $SRC/ | ||
|
||
# Download and extract the seeds tarball into $SRC/seeds | ||
RUN wget https://raw.githubusercontent.com/ardier/fuzzbench/minimized-subsumed-mutants-benchmark-with-seeds/benchmarks/freetype2_ftfuzzer_libafl/seeds.tar -O $SRC/seeds.tar && \ | ||
mkdir -p $SRC/seeds && \ | ||
tar -xvf $SRC/seeds.tar -C $SRC/seeds && \ | ||
rm $SRC/seeds.tar | ||
|
||
# Clean up temporary files | ||
RUN mkdir -p $SRC/corpus | ||
ENV FUZZER_SEEDS="$SRC/seeds" | ||
ENV FUZZER_CORPUS="$SRC/corpus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2020 Google LLC | ||
# | ||
# 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. | ||
|
||
commit: cd02d359a6d0455e9d16b87bf9665961c4699538 | ||
commit_date: 2023-01-28T16:04:38+00:00 | ||
fuzz_target: ftfuzzer | ||
project: freetype2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash -ex | ||
# Copyright 2020 Google LLC | ||
# | ||
# 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. | ||
|
||
mkdir $OUT/seeds | ||
# TRT/fonts is the full seed folder, but they're too big | ||
cp TRT/fonts/TestKERNOne.otf $OUT/seeds/ | ||
cp TRT/fonts/TestGLYFOne.ttf $OUT/seeds/ | ||
cp seeds/* $OUT/seeds/ | ||
|
||
tar xf libarchive-3.4.3.tar.xz | ||
|
||
cd libarchive-3.4.3 | ||
./configure --disable-shared | ||
make clean | ||
make -j $(nproc) | ||
make install | ||
cd .. | ||
|
||
cd freetype2 | ||
./autogen.sh | ||
./configure --with-harfbuzz=no --with-bzip2=no --with-png=no --without-zlib | ||
make clean | ||
make all -j $(nproc) | ||
|
||
$CXX $CXXFLAGS -std=c++11 -I include -I . src/tools/ftfuzzer/ftfuzzer.cc \ | ||
objs/.libs/libfreetype.a $FUZZER_LIB -L /usr/local/lib -larchive \ | ||
-o $OUT/ftfuzzer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters