Skip to content

Commit

Permalink
Guard against parsing "inf" into an int64 in the EasyAccess/ISO API.
Browse files Browse the repository at this point in the history
(Diff authored by clanmills)
  • Loading branch information
mallman committed Mar 5, 2022
1 parent 8bb46fb commit 531de46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/easyaccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ namespace Exiv2 {
std::ostringstream os;
md->write(os, &ed);
bool ok = false;
if ( os.str().find("inf") != std::string::npos ) break;
iso_val = parseInt64(os.str(), ok);
if (ok && iso_val > 0) break;
while (strcmp(keys[idx++], md->key().c_str()) != 0 && idx < cnt) {}
Expand Down

0 comments on commit 531de46

Please sign in to comment.