Merge pull request #6088 from mshabunin:fix-exif-parsing

pull/6032/head
Alexander Alekhin 9 years ago
commit e4dc479e95
  1. 5
      modules/imgcodecs/src/jpeg_exif.cpp

@ -245,7 +245,10 @@ void ExifReader::parseExif()
*/
Endianess_t ExifReader::getFormat() const
{
if( m_data[0] != m_data[1] )
if (m_data.size() < 1)
return NONE;
if( m_data.size() > 1 && m_data[0] != m_data[1] )
{
return NONE;
}

Loading…
Cancel
Save