imgcodecs: fix RBaseStream hang on truncated inputs

This commit is contained in:
Alexander Alekhin 2018-02-21 13:15:10 +03:00
parent f61076a5d8
commit 6e8241b78d

View File

@ -105,7 +105,6 @@ void RBaseStream::readBlock()
fseek( m_file, m_block_pos, SEEK_SET );
size_t readed = fread( m_start, 1, m_block_size, m_file );
m_end = m_start + readed;
m_current = m_start;
if( readed == 0 || m_current >= m_end )
CV_THROW (RBS_THROW_EOS);