Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1307)

Unified Diff: testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc

Issue 2021403002: Update libpng to 1.6.22 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rearrange pnglibconf.h Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc
diff --git a/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc b/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc
index 15a23c0444b00c3353ec593fa2d264a8916e396e..1ea45d36c565ad305b889ec67482bbf30bfc216f 100644
--- a/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc
+++ b/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc
@@ -46,11 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
assert(png_ptr);
- png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK;
- png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_IGNORE;
-
- png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;
- png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN;
+ png_set_crc_action(png_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE);
png_infop info_ptr = png_create_info_struct(png_ptr);
assert(info_ptr);
@@ -66,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
png_set_sig_bytes(png_ptr, kPngHeaderSize);
// libpng error handling.
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
return 0;
}
@@ -77,7 +73,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
&png_free, png_ptr, row));
// reset error handler to put png_deleter into scope.
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
return 0;
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698