File openexr-CVE-2020-16589.patch of Package openexr.20697

Index: openexr-2.2.1/IlmImf/ImfTiledInputFile.cpp
===================================================================
--- openexr-2.2.1.orig/IlmImf/ImfTiledInputFile.cpp	2020-12-16 11:11:18.584567006 +0100
+++ openexr-2.2.1/IlmImf/ImfTiledInputFile.cpp	2020-12-16 11:11:18.612567177 +0100
@@ -1345,6 +1345,13 @@ TiledInputFile::rawTileData (int &dx, in
                 throw IEX_NAMESPACE::ArgExc ("rawTileData read the wrong tile");
             }
         }
+        else
+        {
+             if(!isValidTile (dx, dy, lx, ly) )
+             {
+                 throw IEX_NAMESPACE::IoExc ("rawTileData read an invalid tile");
+             }
+        }
         pixelData = tileBuffer->buffer;
     }
     catch (IEX_NAMESPACE::BaseExc &e)
openSUSE Build Service is sponsored by