1 Star 0 Fork 30

baizg1107/OpenEXR

forked from src-openEuler/OpenEXR 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-3605.patch 765 Bytes
一键复制 编辑 原始数据 按行查看 历史
programmer12 提交于 2021-09-01 20:07 . fix CVE-2021-3605
From 2a4f6d9ecd0c9ab2dfaf6bdb99ec962aa1ad09e9 Mon Sep 17 00:00:00 2001
From: peterhillman <[email protected]>
Date: Fri,4 Jun 2021 11:12:16 +1200
Subject: [PATCH] detect buffer overflow in RleUncompress(#1036)
---
IlmImf/ImfRle.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/IlmImf/ImfRle.cpp b/IlmImf/ImfRle.cpp
index f6992fa..458f261 100644
--- a/IlmImf/ImfRle.cpp
+++ b/IlmImf/ImfRle.cpp
@@ -145,6 +145,10 @@ rleUncompress (int inLength, int maxLength, const signed char in[], char out[])
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;
memset(out, *(char*)in, count+1);
out += count+1;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bzg1107/OpenEXR.git
[email protected]:bzg1107/OpenEXR.git
bzg1107
OpenEXR
OpenEXR
master

搜索帮助