1 Star 0 Fork 30

baizg1107/OpenEXR

forked from src-openEuler/OpenEXR 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-3477.patch 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
From 467be80b75642efbbe6bdace558079f68c16acb1 Mon Sep 17 00:00:00 2001
From: peterhillman <[email protected]>
Date: Tue, 10 Nov 2020 08:35:59 +1300
Subject: [PATCH] Fix overflow computing deeptile sample table size (#861)
Signed-off-by: Peter Hillman <[email protected]>
---
IlmImf/ImfDeepTiledInputFile.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/IlmImf/ImfDeepTiledInputFile.cpp b/IlmImf/ImfDeepTiledInputFile.cpp
index 0f893481b..f5abe9c6a 100644
--- a/IlmImf/ImfDeepTiledInputFile.cpp
+++ b/IlmImf/ImfDeepTiledInputFile.cpp
@@ -1034,8 +1034,8 @@ DeepTiledInputFile::initialize ()
for (size_t i = 0; i < _data->tileBuffers.size(); i++)
_data->tileBuffers[i] = new TileBuffer ();
- _data->maxSampleCountTableSize = _data->tileDesc.ySize *
- _data->tileDesc.xSize *
+ _data->maxSampleCountTableSize = static_cast<size_t>(_data->tileDesc.ySize) *
+ static_cast<size_t>(_data->tileDesc.xSize) *
sizeof(int);
_data->sampleCountTableBuffer.resizeErase(_data->maxSampleCountTableSize);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bzg1107/OpenEXR.git
[email protected]:bzg1107/OpenEXR.git
bzg1107
OpenEXR
OpenEXR
master

搜索帮助