Commit 51797d13 authored by Maksim Shabunin's avatar Maksim Shabunin

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

parents 3cb76d5c 933dfed4
......@@ -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
......
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