1 Star 0 Fork 14

liuyumeng/jbig2dec

forked from src-openEuler/jbig2dec 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backprot-add-casts-to-silence-a-compiler-warning.patch 977 Bytes
一键复制 编辑 原始数据 按行查看 历史
dowzyx 提交于 2021-03-27 14:57 . fix fuzz test from open source community
From d8294b25104e9033408c18b68567281ae8e9d5e0 Mon Sep 17 00:00:00 2001
From: Sebastian Rasmussen <[email protected]>
Date: Sat, 7 Nov 2020 00:33:46 +0800
Subject: [PATCH] jbig2dec: Add casts to silence a compiler warning.
---
jbig2_image.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jbig2_image.c b/jbig2_image.c
index 2cb1e14..19eef22 100644
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -347,8 +347,8 @@ jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src, int x, int
if (src == NULL)
return 0;
- if ((UINT32_MAX - src->width < (x > 0 ? x : -x)) ||
- (UINT32_MAX - src->height < (y > 0 ? y : -y)))
+ if ((UINT32_MAX - src->width < (uint32_t) (x > 0 ? x : -x)) ||
+ (UINT32_MAX - src->height < (uint32_t) (y > 0 ? y : -y)))
{
#ifdef JBIG2_DEBUG
jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, JBIG2_UNKNOWN_SEGMENT_NUMBER, "overflow in compose_image");
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liuyumeng1/jbig2dec.git
[email protected]:liuyumeng1/jbig2dec.git
liuyumeng1
jbig2dec
jbig2dec
master

搜索帮助