Commit 3a92371b authored by Maksim Shabunin's avatar Maksim Shabunin

EXIF reader: fixed file descriptor leak in case of broken tags

parent 177aef05
......@@ -170,6 +170,7 @@ std::map<int, ExifEntry_t > ExifReader::getExif()
case APP1: //actual Exif Marker
exifSize = getFieldSize(f);
if (exifSize <= offsetToTiffHeader) {
fclose(f);
throw ExifParsingError();
}
m_data.resize( exifSize - offsetToTiffHeader );
......
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