Skip to content

Commit

Permalink
Don't deref end iterator.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Jul 9, 2021
1 parent f8ae929 commit 033175e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/canonmn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2750,6 +2750,7 @@ namespace Exiv2 {
if (pos == metadata->end() || pos->value().count() < 3 || pos->value().typeId() != unsignedShort ||
pos->value().toFloat(2) == 0.0F) {
os << "Unknown Lens (" << lensType << ")";
return os;
}

int const exifFlMin = static_cast<int>(static_cast<float>(pos->value().toLong(1)) / pos->value().toFloat(2));
Expand All @@ -2759,6 +2760,7 @@ namespace Exiv2 {
pos = metadata->findKey(aperKey);
if (pos == metadata->end() || pos->value().count() != 1 || pos->value().typeId() != unsignedShort) {
os << "Unknown Lens (" << lensType << ")";
return os;
}

auto exifAperMax = fnumber(canonEv(static_cast<int16_t>(pos->value().toLong(0))));
Expand Down

0 comments on commit 033175e

Please sign in to comment.