File: ossfuzz.sh

package info (click to toggle)
libssh2 1.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,504 kB
  • sloc: ansic: 46,104; sh: 6,164; makefile: 348; cpp: 120; perl: 65; lisp: 33; awk: 23
file content (33 lines) | stat: -rwxr-xr-x 784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash

set -eu

# This script is called by the oss-fuzz main project when compiling the fuzz
# targets. This script is regression tested by ci/ossfuzz.sh.

# Save off the current folder as the build root.
export BUILD_ROOT="$PWD"

echo "CC: $CC"
echo "CXX: $CXX"
echo "LIB_FUZZING_ENGINE: $LIB_FUZZING_ENGINE"
echo "CFLAGS: $CFLAGS"
echo "CXXFLAGS: $CXXFLAGS"
echo "OUT: $OUT"

MAKEFLAGS+="-j$(nproc)"
export MAKEFLAGS

# Install dependencies
apt-get -y install automake libtool libssl-dev zlib1g-dev

# Compile the fuzzer.
autoreconf -fi
./configure --disable-shared \
            --enable-ossfuzzers \
            --disable-examples-build \
            --enable-debug
make V=1

# Copy the fuzzer to the output directory.
cp -v tests/ossfuzz/ssh2_client_fuzzer "$OUT/"