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>
This commit is contained in:
Cosmin Truta 2022-11-20 21:13:14 +02:00
parent f6036c0aeb
commit 8cfdb5436d
3 changed files with 3 additions and 6 deletions

View File

@ -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.

View File

@ -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").

View File

@ -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);