Commit 80df9dde authored by jiakai's avatar jiakai

check for exifSize

parent 1260060d
......@@ -158,6 +158,9 @@ std::map<int, ExifEntry_t > ExifReader::getExif()
case APP1: //actual Exif Marker
exifSize = getFieldSize(f);
if (exifSize <= offsetToTiffHeader) {
throw ExifParsingError();
}
m_data.resize( exifSize - offsetToTiffHeader );
fseek(f, static_cast<long>( offsetToTiffHeader ), SEEK_CUR);
count = fread( &m_data[0], sizeof( unsigned char ), exifSize - offsetToTiffHeader, f );
......
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