[libpng16] Treat benign errors as warnings in the libpng fuzzer

This commit is contained in:
Glenn Randers-Pehrson 2017-09-27 08:19:11 -05:00
parent 4f0a0b9a94
commit cae11e3e43
2 changed files with 5 additions and 2 deletions

View File

@ -13,7 +13,7 @@ They were licensed by Google Inc, using the BSD-like Chromium license,
which may be found at https://cs.chromium.org/chromium/src/LICENSE, or, if
noted in the source, under the Apache-2.0 license, which may
be found at http://www.apache.org/licenses/LICENSE-2.0 .
If they have been modified, the derivatives are copyright Glenn Randers-Pehson
If they have been modified, the derivatives are copyright Glenn Randers-Pehrson
and are released under the same licenses as the originals. Several of
the original files (libpng_read_fuzzer.options, png.dict, project.yaml)
had no licensing information; we assumed that these were under the Chromium

View File

@ -5,7 +5,7 @@
// 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.33beta03 [September 25, 2017]
// Last changed in libpng 1.6.33beta03 [September 27, 2017]
// The modifications in 2017 by Glenn Randers-Pehrson include
// 1. addition of a PNG_CLEANUP macro,
@ -118,6 +118,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return 0;
}
/* Treat benign errors as warnings */
png_set_benign_errors(png_handler.png_ptr, 1);
png_set_crc_action(png_handler.png_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE);
#ifdef PNG_IGNORE_ADLER32