From 531de46db73e4beaf89a0ebb21b99bfe81e121f3 Mon Sep 17 00:00:00 2001 From: Michael Allman Date: Sat, 5 Mar 2022 13:48:19 -0800 Subject: [PATCH] Guard against parsing "inf" into an int64 in the EasyAccess/ISO API. (Diff authored by clanmills) --- src/easyaccess.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/easyaccess.cpp b/src/easyaccess.cpp index 2f216e6150..7c1284b298 100644 --- a/src/easyaccess.cpp +++ b/src/easyaccess.cpp @@ -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) {}