Merge pull request #5653 from jia-kai:fix-jpeg-exif

pull/5704/head
Maksim Shabunin 9 years ago
commit 51797d133a
  1. 3
      modules/imgcodecs/src/jpeg_exif.cpp

@ -401,6 +401,9 @@ std::string ExifReader::getString(const size_t offset) const
{
dataOffset = getU32( offset + 8 );
}
if (dataOffset > m_data.size() || dataOffset + size > m_data.size()) {
throw ExifParsingError();
}
std::vector<uint8_t>::const_iterator it = m_data.begin() + dataOffset;
std::string result( it, it + size ); //copy vector content into result

Loading…
Cancel
Save