提交 dcd3edaf 编写于 作者: G Glenn Randers-Pehrson

[libpng16] Restored part of ~PngObjectHandler() that was deleted from

contrib/oss-fuzz/libpng_read_fuzzer.cc
上级 84a5bf83
......@@ -36,6 +36,16 @@ struct PngObjectHandler {
BufState* buf_state = nullptr;
~PngObjectHandler() {
if (png_handler.row_ptr)
png_free(png_handler.png_ptr, png_handler.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);
else if (png_handler.info_ptr)
png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,
nullptr);
else
png_destroy_read_struct(&png_handler.png_ptr, nullptr, nullptr);
delete buf_state;
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册