Skip to content

Commit 17edda8

Browse files
authored
OpenJPH: add build files (#14966)
1 parent b43eda9 commit 17edda8

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

projects/openjph/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
################################################################################
16+
17+
FROM gcr.io/oss-fuzz-base/base-builder
18+
19+
# install dependencies
20+
RUN apt-get update && apt-get install -y cmake libtiff-dev zip
21+
22+
# clone the library
23+
RUN git clone https://github.com/aous72/OpenJPH.git
24+
25+
# clone the seed corpus
26+
RUN git clone --depth 1 https://github.com/aous72/jp2k_test_codestreams.git
27+
28+
# import the build script
29+
COPY build.sh .
30+

projects/openjph/build.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash -eu
2+
# Copyright 2026 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+
# Build the fuzz targets
19+
cd $SRC
20+
mkdir build/
21+
cd build/
22+
cmake $SRC/OpenJPH -DBUILD_SHARED_LIBS=OFF -DOJPH_BUILD_FUZZER=ON -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_C_FLAGS="$CFLAGS"
23+
make -j$(nproc)
24+
cp fuzzing/ojph_expand_fuzz_target $OUT
25+
26+
# Build the seed corpus
27+
cd $SRC
28+
rm -f $OUT/ojph_expand_fuzz_target_seed_corpus.zip
29+
zip -j $OUT/ojph_expand_fuzz_target_seed_corpus.zip jp2k_test_codestreams/openjph/*.j2c

projects/openjph/project.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ auto_ccs:
55
- "pal@sandflow.com"
66
- "miksmith@gmail.com"
77
- "aous@unsw.edu.au"
8+
fuzzing_engines:
9+
- libfuzzer
10+
- afl
11+
- honggfuzz
12+
sanitizers:
13+
- address
14+
- memory
815
main_repo: "https://github.com/aous72/OpenJPH"

0 commit comments

Comments
 (0)