mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
check for exifSize
This commit is contained in:
parent
1260060d7d
commit
80df9ddedb
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user