Commit 4f6c493b authored by Alexander Alekhin's avatar Alexander Alekhin

imgcodecs(png): resolve ASAN issue with vars scope and setjmp() call

parent 2e33844f
......@@ -228,12 +228,12 @@ bool PngDecoder::readData( Mat& img )
uchar** buffer = _buffer;
int color = img.channels() > 1;
if( m_png_ptr && m_info_ptr && m_end_info && m_width && m_height )
{
png_structp png_ptr = (png_structp)m_png_ptr;
png_infop info_ptr = (png_infop)m_info_ptr;
png_infop end_info = (png_infop)m_end_info;
if( m_png_ptr && m_info_ptr && m_end_info && m_width && m_height )
{
if( setjmp( png_jmpbuf ( png_ptr ) ) == 0 )
{
int y;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment