mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 19:20:28 +08:00
EXIF reader: fixed file descriptor leak in case of broken tags
This commit is contained in:
parent
177aef05b6
commit
3a92371b60
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user