diff options
Diffstat (limited to 'contrib/oss-fuzz/libpng_read_fuzzer.cc')
-rw-r--r-- | contrib/oss-fuzz/libpng_read_fuzzer.cc | 5 |
1 files changed, 2 insertions, 3 deletions
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); |