当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 17

openEuler-RISC-V/jasper
关闭

forked from src-openEuler/jasper 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2018-9154.patch 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
jackie_wu 提交于 2020-09-17 11:02 +08:00 . fix some cve for jasper
From fcbabdaaba217124c92dc29472596146756b968e Mon Sep 17 00:00:00 2001
From: Michael Vetter <jubalh@iodoru.org>
Date: Tue, 17 Mar 2020 13:32:11 +0100
Subject: [PATCH] Use return in jpc_dec_process_sot() instead of abort
We don't need to and should not abort here.
Fix CVE-2018-9154.
Fix https://github.com/mdadams/jasper/issues/215
Fix https://github.com/mdadams/jasper/issues/166
Fix https://github.com/mdadams/jasper/issues/175
See: https://github.com/mdadams/jasper/pull/216
Fix https://github.com/jasper-maint/jasper/issues/8
---
src/libjasper/jpc/jpc_dec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libjasper/jpc/jpc_dec.c b/src/libjasper/jpc/jpc_dec.c
index 6d40786..817009e 100644
--- a/src/libjasper/jpc/jpc_dec.c
+++ b/src/libjasper/jpc/jpc_dec.c
@@ -485,7 +485,7 @@ static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms)
if (!(compinfos = jas_alloc2(dec->numcomps,
sizeof(jas_image_cmptparm_t)))) {
- abort();
+ return -1;
}
for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos;
cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) {
@@ -512,7 +512,7 @@ static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms)
/* Convert the PPM marker segment data into a collection of streams
(one stream per tile-part). */
if (!(dec->pkthdrstreams = jpc_ppmstabtostreams(dec->ppmstab))) {
- abort();
+ return -1;
}
jpc_ppxstab_destroy(dec->ppmstab);
dec->ppmstab = 0;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/jasper.git
git@gitee.com:openeuler-risc-v/jasper.git
openeuler-risc-v
jasper
jasper
master

搜索帮助