Fix OOB string access (fixes #5207)
This commit is contained in:
parent
038207235e
commit
86690f1ca0
@ -450,10 +450,18 @@ FrameData::FrameData (rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
|
||||
found = true;
|
||||
lens = "Canon " + ldata;
|
||||
}
|
||||
} else {
|
||||
found = lens_from_make_and_model();
|
||||
}
|
||||
}
|
||||
|
||||
if( !found || lens.substr(lens.find(' ')).length() < 7 ) {
|
||||
const std::string::size_type first_space_pos = lens.find(' ');
|
||||
const std::string::size_type remaining_size =
|
||||
first_space_pos != std::string::npos
|
||||
? lens.size() - first_space_pos
|
||||
: 0;
|
||||
|
||||
if( !found || remaining_size < 7U ) {
|
||||
lt = mnote->findTag("LensID");
|
||||
|
||||
if ( lt ) {
|
||||
@ -464,10 +472,6 @@ FrameData::FrameData (rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
lens_from_make_and_model();
|
||||
}
|
||||
} else if (!make.compare (0, 6, "PENTAX") || (!make.compare (0, 5, "RICOH") && !model.compare (0, 6, "PENTAX"))) {
|
||||
// ISO at max value supported, check manufacturer specific
|
||||
if (iso_speed == 65535 || iso_speed == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user