diff -Naur openexr-2.3.0/exrmakepreview/makePreview.cpp openexr-2.3.0-CVE-2020-16588/exrmakepreview/makePreview.cpp --- openexr-2.3.0/exrmakepreview/makePreview.cpp 2018-08-10 03:35:00.000000000 +0200 +++ openexr-2.3.0-CVE-2020-16588/exrmakepreview/makePreview.cpp 2021-01-09 13:57:41.343549520 +0100 @@ -120,8 +120,8 @@ previewHeight = max (int (h / (w * a) * previewWidth + .5f), 1); previewPixels.resizeErase (previewHeight, previewWidth); - float fx = (previewWidth > 0)? (float (w - 1) / (previewWidth - 1)): 1; - float fy = (previewHeight > 0)? (float (h - 1) / (previewHeight - 1)): 1; + float fx = (previewWidth > 1)? (float (w - 1) / (previewWidth - 1)): 1; + float fy = (previewHeight > 1)? (float (h - 1) / (previewHeight - 1)): 1; float m = Math<float>::pow (2.f, IMATH_NAMESPACE::clamp (exposure + 2.47393f, -20.f, 20.f)); for (int y = 0; y < previewHeight; ++y)