summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKostya Serebryany <konstantin.s.serebryany@gmail.com>2017-09-05 14:02:15 -0700
committerGitHub <noreply@github.com>2017-09-05 14:02:15 -0700
commitcbcb39932c7141fdd2fcc529f69a2c587fb02dac (patch)
tree7e1bfc106085c83e2cb70fd4e4bb43162fd976e7 /contrib
parent52a566af97df73942b2fe2548d324fb2c35bb2f5 (diff)
downloadlibpng-cbcb39932c7141fdd2fcc529f69a2c587fb02dac.tar.gz
properly define PNG_CLEANUP
Should fix https://github.com/google/oss-fuzz/issues/809
Diffstat (limited to 'contrib')
-rw-r--r--contrib/oss-fuzz/libpng_read_fuzzer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/oss-fuzz/libpng_read_fuzzer.cc b/contrib/oss-fuzz/libpng_read_fuzzer.cc
index 9135a0386..5003a8a07 100644
--- a/contrib/oss-fuzz/libpng_read_fuzzer.cc
+++ b/contrib/oss-fuzz/libpng_read_fuzzer.cc
@@ -87,7 +87,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return 0;
}
-#define PNG_CLEANUP
+#define PNG_CLEANUP \
if(png_handler.png_ptr) \
{ \
if (png_handler.row_ptr) \
@@ -103,7 +103,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
png_handler.png_ptr = nullptr; \
png_handler.row_ptr = nullptr; \
png_handler.info_ptr = nullptr; \
- png_handler.end_info_ptr = nullptr;
+ png_handler.end_info_ptr = nullptr; \
}
png_handler.info_ptr = png_create_info_struct(png_handler.png_ptr);