File openexr-CVE-2020-15304.patch of Package openexr.17686

Index: openexr-2.2.1/IlmImf/ImfTiledInputFile.cpp
===================================================================
--- openexr-2.2.1.orig/IlmImf/ImfTiledInputFile.cpp	2020-07-01 13:38:45.427112748 +0200
+++ openexr-2.2.1/IlmImf/ImfTiledInputFile.cpp	2020-07-01 13:41:05.028032935 +0200
@@ -807,7 +807,10 @@ TiledInputFile::TiledInputFile (OPENEXR_
         {
             for (size_t i = 0; i < _data->tileBuffers.size(); i++)
             {
-                delete [] _data->tileBuffers[i]->buffer;
+                if( _data->tileBuffers[i])
+                {
+                   delete [] _data->tileBuffers[i]->buffer;
+                }
             }
         }
         if (streamDataCreated) delete _data->_streamData;
@@ -849,11 +852,14 @@ TiledInputFile::TiledInputFile (const He
         {
             for (size_t i = 0; i < _data->tileBuffers.size(); i++)
             {
-                delete [] _data->tileBuffers[i]->buffer;
+                if( _data->tileBuffers[i])
+                {
+                    delete [] _data->tileBuffers[i]->buffer;
+                }
             }
         }
         delete _data->_streamData;
-	delete _data;
+        delete _data;
         throw;
     }
 }
openSUSE Build Service is sponsored by