File openexr-CVE-2021-20296.patch of Package openexr.20096

Index: openexr-2.2.1/IlmImf/ImfDwaCompressor.cpp
===================================================================
--- openexr-2.2.1.orig/IlmImf/ImfDwaCompressor.cpp	2021-03-31 17:28:23.070431727 +0200
+++ openexr-2.2.1/IlmImf/ImfDwaCompressor.cpp	2021-03-31 17:28:23.086431821 +0200
@@ -2525,7 +2525,7 @@ DwaCompressor::uncompress
 
     if (acCompressedSize > 0)
     {
-        if (totalAcUncompressedCount*sizeof(unsigned short) > _packedAcBufferSize)
+        if ( !_packedAcBuffer || totalAcUncompressedCount*sizeof(unsigned short) > _packedAcBufferSize)
         {
             throw Iex::InputExc("Error uncompressing DWA data"
                                 "(corrupt header).");

openSUSE Build Service is sponsored by