[libpng16] Free row_ptr in contrib/oss-fuzz/libpng_read_fuzzer.cc PNG_CLEANUP
to fix google/oss-fuzz issue 3193.
This commit is contained in:
parent
5c616548a0
commit
ef76b1f688
@ -26,6 +26,8 @@
|
||||
#define PNG_CLEANUP \
|
||||
if(png_handler.png_ptr) \
|
||||
{ \
|
||||
if (row_ptr && png_ptr) \
|
||||
png_free(png_ptr, row_ptr); \
|
||||
if (png_handler.end_info_ptr) \
|
||||
png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,\
|
||||
&png_handler.end_info_ptr); \
|
||||
@ -49,9 +51,6 @@ struct PngObjectHandler {
|
||||
BufState* buf_state = nullptr;
|
||||
|
||||
~PngObjectHandler() {
|
||||
if (row_ptr && png_ptr) {
|
||||
png_free(png_ptr, row_ptr);
|
||||
}
|
||||
PNG_CLEANUP
|
||||
delete buf_state;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user