From 8cfdb5436d7d384e4c8915397ee9ead845418d40 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Sun, 20 Nov 2022 21:13:14 +0200 Subject: Clean up oss-fuzz With the caveat that oss-fuzz needs a full sync with upstream, here are the changes applied to our old copy: * Add a missing #include directive. * Remove the "last changed" version info. * Clean up the trailing whitespace. Co-authored-by: Ilya Yegorov Co-authored-by: Cosmin Truta Signed-off-by: Cosmin Truta --- contrib/oss-fuzz/README.txt | 1 - contrib/oss-fuzz/build.sh | 3 +-- contrib/oss-fuzz/libpng_read_fuzzer.cc | 5 ++--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/contrib/oss-fuzz/README.txt b/contrib/oss-fuzz/README.txt index 3b3656fbb..66d5242c5 100644 --- a/contrib/oss-fuzz/README.txt +++ b/contrib/oss-fuzz/README.txt @@ -1,4 +1,3 @@ -Last changed in libpng 1.6.33 [September 28, 2017] Copyright (c) 2017 Glenn Randers-Pehrson This code is released under the libpng license. diff --git a/contrib/oss-fuzz/build.sh b/contrib/oss-fuzz/build.sh index f9e1b0776..7b8f02639 100755 --- a/contrib/oss-fuzz/build.sh +++ b/contrib/oss-fuzz/build.sh @@ -1,4 +1,5 @@ #!/bin/bash -eu + # Copyright 2017-2018 Glenn Randers-Pehrson # Copyright 2016 Google Inc. # @@ -14,8 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Last changed in libpng 1.6.35 [July 15, 2018] -# # 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"). diff --git a/contrib/oss-fuzz/libpng_read_fuzzer.cc b/contrib/oss-fuzz/libpng_read_fuzzer.cc index 2064a8486..0190cf786 100644 --- a/contrib/oss-fuzz/libpng_read_fuzzer.cc +++ b/contrib/oss-fuzz/libpng_read_fuzzer.cc @@ -5,8 +5,6 @@ // Use of this source code is governed by a BSD-style license that may // be found in the LICENSE file https://cs.chromium.org/chromium/src/LICENSE -// Last changed in libpng 1.6.35 [July 15, 2018] - // The modifications in 2017 by Glenn Randers-Pehrson include // 1. addition of a PNG_CLEANUP macro, // 2. setting the option to ignore ADLER32 checksums, @@ -17,6 +15,7 @@ #include #include +#include #include #include @@ -60,7 +59,7 @@ struct PngObjectHandler { png_free(png_ptr, row_ptr); if (end_info_ptr) png_destroy_read_struct(&png_ptr, &info_ptr, &end_info_ptr); - else if (info_ptr) + else if (info_ptr) png_destroy_read_struct(&png_ptr, &info_ptr, nullptr); else png_destroy_read_struct(&png_ptr, nullptr, nullptr); -- cgit v1.2.3