Accepting request 607454 from devel:libraries:c_c++
- Add patch to safeguard against negative values in uInt bsc#1071321: * 0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch OBS-URL: https://build.opensuse.org/request/show/607454 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zlib?expand=0&rev=67
This commit is contained in:
commit
c9805db145
@ -0,0 +1,28 @@
|
||||
From bb5eec59e3ec66f6dccb79b1900aa806a1cca12e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
||||
Date: Fri, 8 Dec 2017 14:59:08 +0100
|
||||
Subject: [PATCH] Do not try to store negative values in unsigned int
|
||||
|
||||
---
|
||||
deflate.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/deflate.c b/deflate.c
|
||||
index 1ec7614..1bad1eb 100644
|
||||
--- a/deflate.c
|
||||
+++ b/deflate.c
|
||||
@@ -1536,7 +1536,10 @@ local void fill_window(s)
|
||||
|
||||
/* Initialize the hash value now that we have some input: */
|
||||
if (s->lookahead + s->insert >= MIN_MATCH) {
|
||||
- uInt str = s->strstart - s->insert;
|
||||
+ uInt str = 0;
|
||||
+ /* storing negative values to uInt is not good idea */
|
||||
+ if (s->strstart - s->insert > 0)
|
||||
+ str = s->strstart - s->insert;
|
||||
s->ins_h = s->window[str];
|
||||
UPDATE_HASH(s, s->ins_h, s->window[str + 1]);
|
||||
#if MIN_MATCH != 3
|
||||
--
|
||||
2.15.1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 15 10:56:20 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Add patch to safeguard against negative values in uInt bsc#1071321:
|
||||
* 0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 12 17:35:18 UTC 2017 - kah0922@gmail.com
|
||||
|
||||
|
@ -33,6 +33,8 @@ Source6: zlib-rpmlintrc
|
||||
Patch0: zlib-1.2.11-optimized-s390.patch
|
||||
#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf
|
||||
Patch1: zlib-format.patch
|
||||
#PATCH-FIX-UPSTREAM do not store negative values in uInt
|
||||
Patch2: 0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
@ -115,6 +117,7 @@ developing applications which use minizip.
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
export LDFLAGS="-Wl,-z,relro,-z,now"
|
||||
|
Loading…
Reference in New Issue
Block a user