From c527bdfc393c915af98f3d468cb254d0e560f832 Mon Sep 17 00:00:00 2001 From: Aries Moczar Date: Wed, 29 Apr 2026 21:47:16 +0200 Subject: [PATCH] Corrected index verification to reject index matching the string size because this would be out-of bounds as arrays are zero-indexed. Addresses issue #2379 Signed-off-by: Aries Moczar --- src/lib/OpenEXR/ImfIDManifest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/OpenEXR/ImfIDManifest.cpp b/src/lib/OpenEXR/ImfIDManifest.cpp index 8ec2e76a77..d00980fe76 100644 --- a/src/lib/OpenEXR/ImfIDManifest.cpp +++ b/src/lib/OpenEXR/ImfIDManifest.cpp @@ -529,7 +529,7 @@ IDManifest::init (const char* data, const char* endOfData) for (size_t i = 0; i < m.getComponents ().size (); ++i) { int stringIndex = readVariableLengthInteger (data, endOfData); - if (size_t (stringIndex) > stringList.size () || + if (size_t (stringIndex) >= stringList.size () || stringIndex < 0) { throw IEX_NAMESPACE::InputExc (