mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Revert "oss-fuzz: Update the README file, the Docker file and the build script"
This reverts commit 3117b5f94a06aaf52a7365074e8199909680e52e. A regression was introduced. (Oopsie!) Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
parent
cd5e582fd6
commit
529e69e76a
@ -1,5 +1,3 @@
|
||||
# Copyright 2024 Cosmin Truta
|
||||
# Copyright 2017 Glenn Randers-Pehrson
|
||||
# Copyright 2016 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,12 +15,11 @@
|
||||
################################################################################
|
||||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
|
||||
MAINTAINER glennrp@gmail.com
|
||||
RUN apt-get update && \
|
||||
apt-get install -y make autoconf automake libtool zlib1g-dev
|
||||
apt-get install -y make autoconf automake libtool
|
||||
|
||||
RUN git clone --depth=1 https://github.com/pnggroup/libpng.git && \
|
||||
git clone --depth=1 https://github.com/madler/zlib.git && \
|
||||
cp libpng/contrib/oss-fuzz/build.sh $SRC
|
||||
|
||||
WORKDIR /home/libpng
|
||||
RUN git clone --depth 1 https://github.com/madler/zlib.git
|
||||
RUN git clone --depth 1 https://github.com/glennrp/libpng.git
|
||||
RUN cp libpng/contrib/oss-fuzz/build.sh $SRC
|
||||
WORKDIR libpng
|
||||
|
@ -1,7 +1,3 @@
|
||||
libpng additions to oss-fuzz
|
||||
============================
|
||||
|
||||
Copyright (c) 2024 Cosmin Truta
|
||||
Copyright (c) 2017 Glenn Randers-Pehrson
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
#!/bin/bash -eu
|
||||
|
||||
# Copyright 2024 Cosmin Truta
|
||||
# Copyright 2017 Glenn Randers-Pehrson
|
||||
# Copyright 2017-2018 Glenn Randers-Pehrson
|
||||
# Copyright 2016 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,31 +15,36 @@ set -eu
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Revisions by Glenn Randers-Pehrson, 2017:
|
||||
# 1. Build only the library, not the tools (changed "make -j$(nproc) all" to
|
||||
# "make -j$(nproc) libpng16.la").
|
||||
# 2. Disabled WARNING and WRITE options in pnglibconf.dfa.
|
||||
# 3. Build zlib alongside libpng
|
||||
################################################################################
|
||||
|
||||
# Disable logging via library build configuration control.
|
||||
sed -e "s/option STDIO/option STDIO disabled/" \
|
||||
-e "s/option WARNING /option WARNING disabled/" \
|
||||
-e "s/option WRITE enables WRITE_INT_FUNCTIONS/option WRITE disabled/" \
|
||||
scripts/pnglibconf.dfa >scripts/pnglibconf.dfa.tmp
|
||||
mv -f scripts/pnglibconf.dfa.tmp scripts/pnglibconf.dfa
|
||||
cat scripts/pnglibconf.dfa | \
|
||||
sed -e "s/option STDIO/option STDIO disabled/" \
|
||||
-e "s/option WARNING /option WARNING disabled/" \
|
||||
-e "s/option WRITE enables WRITE_INT_FUNCTIONS/option WRITE disabled/" \
|
||||
> scripts/pnglibconf.dfa.temp
|
||||
mv scripts/pnglibconf.dfa.temp scripts/pnglibconf.dfa
|
||||
|
||||
# Build the libpng library ("libpng16.la"), excluding the auxiliary tools.
|
||||
# build the libpng library.
|
||||
autoreconf -f -i
|
||||
./configure --with-libpng-prefix=OSS_FUZZ_
|
||||
make -j$(nproc) clean
|
||||
make -j$(nproc) libpng16.la
|
||||
|
||||
# Build libpng_read_fuzzer.
|
||||
# build libpng_read_fuzzer.
|
||||
$CXX $CXXFLAGS -std=c++11 -I. \
|
||||
$SRC/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc \
|
||||
-o $OUT/libpng_read_fuzzer \
|
||||
-lFuzzingEngine .libs/libpng16.a -lz
|
||||
|
||||
# Add seed corpus.
|
||||
# add seed corpus.
|
||||
find $SRC/libpng -name "*.png" | grep -v crashers | \
|
||||
xargs zip $OUT/libpng_read_fuzzer_seed_corpus.zip
|
||||
|
||||
cp $SRC/libpng/contrib/oss-fuzz/*.dict \
|
||||
$SRC/libpng/contrib/oss-fuzz/*.options \
|
||||
$OUT/
|
||||
$SRC/libpng/contrib/oss-fuzz/*.options $OUT/
|
||||
|
Loading…
x
Reference in New Issue
Block a user