!13 [sync] PR-12: bugfix int overflow and rebuild

From: @openeuler-sync-bot
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
This commit is contained in:
openeuler-ci-bot 2021-05-21 14:47:13 +08:00 committed by Gitee
commit df8145b200
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,22 @@
From 7ec4ebab1dbbbe2188824c72c91c3faf460acf5b Mon Sep 17 00:00:00 2001
From: songnannan2 <songnannan2@huawei.com>
Date: Wed, 26 Feb 2020 15:19:02 +0800
Subject: [PATCH] jbig2dec: bugfix int overflow
---
jbig2_mmr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jbig2_mmr.c b/jbig2_mmr.c
index da54934..0a16a7e 100644
--- a/jbig2_mmr.c
+++ b/jbig2_mmr.c
@@ -73,7 +73,7 @@ jbig2_decode_mmr_init(Jbig2MmrCtx *mmr,
mmr->bit_index = 0;
for (i = 0; i < size && i < 4; i++)
- word |= (data[i] << ((3 - i) << 3));
+ word |= ((uint32_t)data[i] << ((3 - i) << 3));
mmr->word = word;
}

View File

@ -1,11 +1,12 @@
Name: jbig2dec
Version: 0.18
Release: 1
Release: 3
Summary: A decoder implementation of the JBIG2 image compression format.
License: GPLv2
License: AGPLv3+
URL: https://jbig2dec.com/
Source0: https://github.com/ArtifexSoftware/jbig2dec/archive/%{name}-%{version}.tar.gz
Patch9000: jbig2dec-bugfix-int-overflow.patch
BuildRequires: gcc libtool chrpath
Provides: %{name}-libs = %{version}-%{release}
@ -62,6 +63,12 @@ echo "/usr/lib64" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%{_mandir}/man1/%{name}.1*
%changelog
* Tue Feb 9 2021 jinzhimin <jinzhimin2@huawei.com> - 0.18-3
- rebuild jbig2dec
* Tue Feb 9 2021 jinzhimin <jinzhimin2@huawei.com> - 0.18-2
- bugfix int overflow
* Fri Apr 17 2020 songnannan <songnannan2@huawei.com> - 0.18-1
- Type:enhancement
- ID:NA