18 lines
825 B
Diff
18 lines
825 B
Diff
diff -ruNp a/src/lib/OpenEXR/ImfIDManifest.cpp b/src/lib/OpenEXR/ImfIDManifest.cpp
|
|
--- a/src/lib/OpenEXR/ImfIDManifest.cpp 2026-06-25 11:37:35.541229769 +0200
|
|
+++ b/src/lib/OpenEXR/ImfIDManifest.cpp 2026-06-25 11:39:22.576872688 +0200
|
|
@@ -359,6 +359,13 @@ void IDManifest::init(const char* data,
|
|
//
|
|
// previous string had more than 255 characters?
|
|
//
|
|
+ const size_t minPrefixLen =
|
|
+ stringList[i - 1].size () > 255 ? size_t (2) : size_t (1);
|
|
+ if (stringList[i].size () < minPrefixLen)
|
|
+ {
|
|
+ throw IEX_NAMESPACE::InputExc (
|
|
+ "IDManifest string too small for common prefix length");
|
|
+ }
|
|
if(stringList[i-1].size()>255)
|
|
{
|
|
common = size_t( ((unsigned char) (stringList[i][0])) <<8 ) + size_t( (unsigned char) (stringList[i][1]));
|