properly define PNG_CLEANUP

Should fix https://github.com/google/oss-fuzz/issues/809
This commit is contained in:
Kostya Serebryany 2017-09-05 14:02:15 -07:00 committed by GitHub
parent 52a566af97
commit cbcb39932c

View File

@ -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);