File tree Expand file tree Collapse file tree 4 files changed +52
-2
lines changed
Expand file tree Collapse file tree 4 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 1515# ###############################################################################
1616
1717FROM gcr.io/oss-fuzz-base/base-builder
18- RUN apt-get update && apt-get install -y make autoconf automake autogen pkg-config libtool flex bison cmake libnuma-dev libpcre2-dev
18+ RUN apt-get update && apt-get install -y make autoconf automake autogen pkg-config libtool flex bison cmake libnuma-dev libpcre2-dev libjson-c-dev
1919RUN git clone --depth 1 https://github.com/ntop/nDPI.git ndpi
2020ADD https://www.tcpdump.org/release/libpcap-1.9.1.tar.gz libpcap-1.9.1.tar.gz
21- COPY build.sh $SRC/
21+ ADD https://github.com/json-c/json-c/archive/refs/tags/json-c-0.17-20230812.tar.gz json-c-0.17-20230812.tar.gz
22+ RUN tar -xvzf json-c-0.17-20230812.tar.gz
23+ COPY build.sh run_tests.diff run_tests.sh $SRC/
2224WORKDIR $SRC
Original file line number Diff line number Diff line change 1515#
1616# ###############################################################################
1717
18+ pushd $SRC /ndpi
19+ git apply $SRC /run_tests.diff
20+ popd
21+
22+ pushd $SRC /json-c-json-c-0.17-20230812
23+ mkdir build
24+ cd build
25+ cmake -DBUILD_SHARED_LIBS=OFF ..
26+ make -j$( nproc)
27+ make install
28+ popd
29+
1830bash -x ./ndpi/tests/ossfuzz.sh
31+ pushd $SRC /ndpi/tests/unit
32+ make unit
33+ popd
Original file line number Diff line number Diff line change 1+ diff --git a/tests/ossfuzz.sh b/tests/ossfuzz.sh
2+ index e63a3d2..02fef25 100644
3+ --- a/tests/ossfuzz.sh
4+ +++ b/tests/ossfuzz.sh
5+ @@ -44,7 +44,7 @@ fi
6+ cd ndpi
7+ # Set LDFLAGS variable and `--with-only-libndpi` option as workaround for the
8+ # "missing dependencies errors" in the introspector build. See #8939
9+ - RANLIB=llvm-ranlib LDFLAGS="-L/usr/local/lib -lpcap" ./autogen.sh --enable-fuzztargets --with-only-libndpi --enable-tls-sigs
10+ + RANLIB=llvm-ranlib LDFLAGS="-L/usr/local/lib -lpcap" ./autogen.sh --enable-fuzztargets --enable-tls-sigs
11+ make -j$(nproc)
12+ # Copy fuzzers
13+ ls fuzz/fuzz* | grep -v "\." | while read -r i; do cp "$i" "$OUT"/; done
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+ # Copyright 2025 Google LLC.
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+ #
16+ # ###############################################################################
17+
18+ pushd $SRC /ndpi/tests/unit
19+ ./unit
20+ popd
You can’t perform that action at this time.
0 commit comments