1 Star 0 Fork 30

wang_yue111/OpenEXR

forked from src-openEuler/OpenEXR 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-3475-pre1.patch 971 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 46833b0e090a31cdccc32cad1ca27fe601d79875 Mon Sep 17 00:00:00 2001
From: Cary Phillips <[email protected]>
Date: Sat, 8 Aug 2020 16:34:02 -0700
Subject: [PATCH] Change >= to > in overflow calculation
Signed-off-by: Cary Phillips <[email protected]>
---
IlmImf/ImfTiledMisc.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/IlmImf/ImfTiledMisc.cpp b/IlmImf/ImfTiledMisc.cpp
index 1cff8037d..51b6e5c26 100644
--- a/IlmImf/ImfTiledMisc.cpp
+++ b/IlmImf/ImfTiledMisc.cpp
@@ -301,11 +301,11 @@ calculateNumTiles (int *numTiles,
{
for (int i = 0; i < numLevels; i++)
{
- int l = levelSize (min, max, i, rmode);
- if (l >= std::numeric_limits<int>::max() - size + 1)
+ int l = levelSize (min, max, i, rmode);
+ if (l > std::numeric_limits<int>::max() - size + 1)
throw IEX_NAMESPACE::ArgExc ("Invalid size.");
- numTiles[i] = (l + size - 1) / size;
+ numTiles[i] = (l + size - 1) / size;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang_yue111/OpenEXR.git
[email protected]:wang_yue111/OpenEXR.git
wang_yue111
OpenEXR
OpenEXR
master

搜索帮助