From 357af1f095320c76f7c9d2bcf7de48dd809358e4 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 11 Oct 2017 11:56:30 -0500 Subject: [PATCH] ]libpng16] Add png_read_update_info() where needed in the fuzzer --- contrib/oss-fuzz/libpng_read_fuzzer.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/oss-fuzz/libpng_read_fuzzer.cc b/contrib/oss-fuzz/libpng_read_fuzzer.cc index 417c280e0..2b7270e62 100644 --- a/contrib/oss-fuzz/libpng_read_fuzzer.cc +++ b/contrib/oss-fuzz/libpng_read_fuzzer.cc @@ -172,6 +172,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { int passes = png_set_interlace_handling(png_handler.png_ptr); png_start_read_image(png_handler.png_ptr); + png_read_update_info(png_handler.png_ptr, png_handler.png_info_ptr); + for (int pass = 0; pass < passes; ++pass) { for (png_uint_32 y = 0; y < height; ++y) { png_read_row(png_handler.png_ptr,