Merge pull request #2357 from radarhere/zlib

Updated zlib to 1.2.11
This commit is contained in:
Hugo 2017-01-19 20:51:58 +02:00 committed by GitHub
commit 8b2681e369
2 changed files with 7 additions and 37 deletions

View File

@ -631,16 +631,11 @@ class pil_build_ext(build_ext):
build_ext.build_extensions(self) build_ext.build_extensions(self)
# #
# sanity and security checks # sanity checks
unsafe_zlib = None self.summary_report(feature)
if feature.zlib: def summary_report(self, feature):
unsafe_zlib = self.check_zlib_version(self.compiler.include_dirs)
self.summary_report(feature, unsafe_zlib)
def summary_report(self, feature, unsafe_zlib):
print("-" * 68) print("-" * 68)
print("PIL SETUP SUMMARY") print("PIL SETUP SUMMARY")
@ -676,16 +671,6 @@ class pil_build_ext(build_ext):
print("*** %s support not available" % option[1]) print("*** %s support not available" % option[1])
all = 0 all = 0
if feature.zlib and unsafe_zlib:
print("")
print("*** Warning: zlib", unsafe_zlib)
print("may contain a security vulnerability.")
print("*** Consider upgrading to zlib 1.2.3 or newer.")
print("*** See: http://www.kb.cert.org/vuls/id/238678")
print(" http://www.kb.cert.org/vuls/id/680620")
print(" http://www.gzip.org/zlib/advisory-2002-03-11.txt")
print("")
print("-" * 68) print("-" * 68)
if not all: if not all:
@ -697,21 +682,6 @@ class pil_build_ext(build_ext):
print("To check the build, run the selftest.py script.") print("To check the build, run the selftest.py script.")
print("") print("")
def check_zlib_version(self, include_dirs):
# look for unsafe versions of zlib
for subdir in include_dirs:
zlibfile = os.path.join(subdir, "zlib.h")
if os.path.isfile(zlibfile):
break
else:
return
for line in open(zlibfile).readlines():
m = re.match(r'#define\s+ZLIB_VERSION\s+"([^"]*)"', line)
if not m:
continue
if m.group(1) < "1.2.3":
return m.group(1)
# https://hg.python.org/users/barry/rev/7e8deab93d5a # https://hg.python.org/users/barry/rev/7e8deab93d5a
def add_multiarch_paths(self): def add_multiarch_paths(self):
# Debian/Ubuntu multiarch support. # Debian/Ubuntu multiarch support.

View File

@ -19,10 +19,10 @@ libs = {
# 'version': '2.0' # 'version': '2.0'
# }, # },
'zlib': { 'zlib': {
'url': 'http://zlib.net/zlib1210.zip', 'url': 'http://zlib.net/zlib1211.zip',
'filename': PILLOW_DEPENDS_DIR + 'zlib1210.zip', 'filename': PILLOW_DEPENDS_DIR + 'zlib1211.zip',
'hash': 'md5:5327bdff96926cf9c479008bae983bc0', 'hash': 'md5:16b41357b2cd81bca5e1947238e64465',
'dir': 'zlib-1.2.10', 'dir': 'zlib-1.2.11',
}, },
'jpeg': { 'jpeg': {
'url': 'http://www.ijg.org/files/jpegsr9b.zip', 'url': 'http://www.ijg.org/files/jpegsr9b.zip',