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

This commit is contained in:
Maksim Shabunin 2015-11-20 15:37:50 +00:00
commit 51797d133a

View File

@ -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