mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-23 03:18:59 +00:00
6d1d244615
I don't need qpdf's fuzz to find leaks and invalid memory in gnutls.
36 lines
982 B
Bash
Executable File
36 lines
982 B
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
# This is used invoked from
|
|
# https://github.com/google/oss-fuzz/blob/master/projects/qpdf/build.sh
|
|
|
|
# It should be run from the top level directory of a clean checkout of
|
|
# qpdf. It is also exercised in ../azure-pipelines/build-fuzzer
|
|
|
|
if [[ $GITHUB_FORK != "" ]]; then
|
|
git remote add fork https://github.com/$GITHUB_FORK/qpdf
|
|
git fetch fork --depth=1
|
|
CUR_BRANCH=$(git rev-parse --abbrev-ref @)
|
|
if [[ $GITHUB_BRANCH == "" ]]; then
|
|
GITHUB_BRANCH=$CUR_BRANCH
|
|
fi
|
|
if [[ $GITHUB_BRANCH == $CUR_BRANCH ]]; then
|
|
git reset --hard fork/$CUR_BRANCH
|
|
else
|
|
git branch -f $GITHUB_BRANCH fork/$GITHUB_BRANCH
|
|
git checkout $GITHUB_BRANCH
|
|
fi
|
|
fi
|
|
|
|
./configure \
|
|
--enable-oss-fuzz \
|
|
--enable-static \
|
|
--disable-shared \
|
|
--enable-crypto-native \
|
|
--disable-implicit-crypto \
|
|
--prefix="$WORK" \
|
|
LDFLAGS="-L$WORK/lib" \
|
|
CPPFLAGS="-I$WORK/include" \
|
|
LIBS="-pthread"
|
|
make -j$(nproc) install
|
|
make install_fuzz
|