File openexr-CVE-2021-3605.patch of Package openexr.20112
Index: openexr-2.1.0/IlmImf/ImfRleCompressor.cpp
===================================================================
--- openexr-2.1.0.orig/IlmImf/ImfRleCompressor.cpp 2021-06-16 14:12:01.314892901 +0200
+++ openexr-2.1.0/IlmImf/ImfRleCompressor.cpp 2021-06-16 14:19:33.101848111 +0200
@@ -153,6 +153,11 @@ rleUncompress (int inLength, int maxLeng
if (0 > (maxLength -= count + 1))
return 0;
+ // check the input buffer is big enough to contain
+ // byte to be duplicated
+ if (inLength < 0)
+ return 0;
+
while (count-- >= 0)
*out++ = *(char *) in;