6 Star 0 Fork 9

src-openEuler/stb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1539.patch 847 Bytes
一键复制 编辑 原始数据 按行查看 历史
peijiankang 提交于 2023-11-10 17:23 . fix CVE-2023-45661
From 8cfcbf7dde7705c849f4f7a5acb26f79b895fffe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
Date: Thu, 19 Oct 2023 15:57:03 +0200
Subject: [PATCH] Fix wild address read in stbi__gif_load_next
It seems `layers` were forgotten to include in equation.
Fixes #1538
---
stb_image.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stb_image.h b/stb_image.h
index 5e807a0a6..cd09ab697 100644
--- a/stb_image.h
+++ b/stb_image.h
@@ -7019,7 +7019,7 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
}
memcpy( out + ((layers - 1) * stride), u, stride );
if (layers >= 2) {
- two_back = out - 2 * stride;
+ two_back = out + (layers - 2) * stride;
}
if (delays) {
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/stb.git
git@gitee.com:src-openeuler/stb.git
src-openeuler
stb
stb
master

搜索帮助