!44 [sync] PR-43: fix issue
From: @openeuler-sync-bot Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
9d45e80337
57
clamav-type-conversion.patch
Normal file
57
clamav-type-conversion.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
From adcae42c2094096606a26976fb5829aa1ce5937b Mon Sep 17 00:00:00 2001
|
||||||
|
From: caodongxia <315816521@qq.com>
|
||||||
|
Date: Mon, 31 May 2021 16:43:12 +0800
|
||||||
|
Subject: [PATCH] create patch
|
||||||
|
|
||||||
|
---
|
||||||
|
libclamav/upx.c | 6 +++---
|
||||||
|
libclammspack/mspack/cabd.c | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libclamav/upx.c b/libclamav/upx.c
|
||||||
|
index 4663861..0e7b2c8 100644
|
||||||
|
--- a/libclamav/upx.c
|
||||||
|
+++ b/libclamav/upx.c
|
||||||
|
@@ -333,7 +333,7 @@ int upx_inflate2b(const char *src, uint32_t ssize, char *dst, uint32_t *dsize, u
|
||||||
|
return -1;
|
||||||
|
if (backbytes & 0xff000000)
|
||||||
|
return -1;
|
||||||
|
- backbytes <<= 8;
|
||||||
|
+ backbytes = (int32_t)((uint32_t)(backbytes) << 8);
|
||||||
|
backbytes += (unsigned char)(src[scur++]);
|
||||||
|
backbytes ^= 0xffffffff;
|
||||||
|
|
||||||
|
@@ -425,7 +425,7 @@ int upx_inflate2d(const char *src, uint32_t ssize, char *dst, uint32_t *dsize, u
|
||||||
|
return -1;
|
||||||
|
if (backbytes & 0xff000000)
|
||||||
|
return -1;
|
||||||
|
- backbytes <<= 8;
|
||||||
|
+ backbytes = (int32_t)((uint32_t)(backbytes) << 8);
|
||||||
|
backbytes += (unsigned char)(src[scur++]);
|
||||||
|
backbytes ^= 0xffffffff;
|
||||||
|
|
||||||
|
@@ -517,7 +517,7 @@ int upx_inflate2e(const char *src, uint32_t ssize, char *dst, uint32_t *dsize, u
|
||||||
|
return -1;
|
||||||
|
if (backbytes & 0xff000000)
|
||||||
|
return -1;
|
||||||
|
- backbytes <<= 8;
|
||||||
|
+ backbytes = (int32_t)((uint32_t)(backbytes) << 8);
|
||||||
|
backbytes += (unsigned char)(src[scur++]);
|
||||||
|
backbytes ^= 0xffffffff;
|
||||||
|
|
||||||
|
diff --git a/libclammspack/mspack/cabd.c b/libclammspack/mspack/cabd.c
|
||||||
|
index 75ef277..4dffd6b 100644
|
||||||
|
--- a/libclammspack/mspack/cabd.c
|
||||||
|
+++ b/libclammspack/mspack/cabd.c
|
||||||
|
@@ -1398,7 +1398,7 @@ static unsigned int cabd_checksum(unsigned char *data, unsigned int bytes,
|
||||||
|
unsigned int len, ul = 0;
|
||||||
|
|
||||||
|
for (len = bytes >> 2; len--; data += 4) {
|
||||||
|
- cksum ^= ((data[0]) | (data[1]<<8) | (data[2]<<16) | (data[3]<<24));
|
||||||
|
+ cksum ^= ((data[0]) | ((unsigned int)(data[1])<<8) | ((unsigned int)(data[2])<<16) | ((unsigned int)(data[3])<<24));
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (bytes & 3) {
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,7 +1,8 @@
|
|||||||
Name: clamav
|
Name: clamav
|
||||||
Summary: End-user tools for the Clam Antivirus scanner
|
Summary: End-user tools for the Clam Antivirus scanner
|
||||||
Version: 0.103.2
|
Version: 0.103.2
|
||||||
Release: 1
|
Release: 2
|
||||||
|
|
||||||
License: GPLv2 and Public Domain and bzip2-1.0.6 and Zlib and Apache-2.0
|
License: GPLv2 and Public Domain and bzip2-1.0.6 and Zlib and Apache-2.0
|
||||||
URL: https://www.clamav.net/
|
URL: https://www.clamav.net/
|
||||||
Source0: https://www.clamav.net/downloads/production/clamav-%{version}.tar.gz
|
Source0: https://www.clamav.net/downloads/production/clamav-%{version}.tar.gz
|
||||||
@ -26,6 +27,7 @@ Patch0003: clamav-0.99-private.patch
|
|||||||
Patch0004: clamav-check.patch
|
Patch0004: clamav-check.patch
|
||||||
Patch0005: clamav-clamonacc-service.patch
|
Patch0005: clamav-clamonacc-service.patch
|
||||||
Patch0006: clamav-freshclam.service.patch
|
Patch0006: clamav-freshclam.service.patch
|
||||||
|
Patch0007: clamav-type-conversion.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
||||||
BuildRequires: gcc-c++ zlib-devel bzip2-devel gmp-devel curl-devel json-c-devel
|
BuildRequires: gcc-c++ zlib-devel bzip2-devel gmp-devel curl-devel json-c-devel
|
||||||
@ -410,6 +412,9 @@ test -e %_var/log/clamav-milter.log || {
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 1 2021 caodongxia <caodongxia@huawei.com> - 0.103.2-2
|
||||||
|
- fix left shift
|
||||||
|
|
||||||
* Fri Apr 16 2021 wangyue <wangyue92@huawei.com> - 0.103.2-1
|
* Fri Apr 16 2021 wangyue <wangyue92@huawei.com> - 0.103.2-1
|
||||||
- Upgrade to 0.103.2-1
|
- Upgrade to 0.103.2-1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user