summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosmin Truta <ctruta@gmail.com>2022-11-20 21:13:14 +0200
committerCosmin Truta <ctruta@gmail.com>2022-11-20 21:13:14 +0200
commit8cfdb5436d7d384e4c8915397ee9ead845418d40 (patch)
tree8add0d41a0ba0c56383e9911aa1974eea4740f6e
parentf6036c0aeb01ca800bdf41ec5f07ded2ce89d26c (diff)
downloadlibpng-8cfdb5436d7d384e4c8915397ee9ead845418d40.tar.gz
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 <hkctkuy@gmail.com> Co-authored-by: Cosmin Truta <ctruta@gmail.com> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
-rw-r--r--contrib/oss-fuzz/README.txt1
-rwxr-xr-xcontrib/oss-fuzz/build.sh3
-rw-r--r--contrib/oss-fuzz/libpng_read_fuzzer.cc5
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 <stddef.h>
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
#include <vector>
@@ -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);