diff options
author | André Klitzing <aklitzing@gmail.com> | 2022-03-28 22:58:26 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-04-01 06:48:50 +0300 |
commit | 168ff3419f256fdb35b586275d293fc0cd773fe1 (patch) | |
tree | 76e69f56404a428b60836081575bd61e009f4d0a /src/3rdparty/zlib/src/gzread.c | |
parent | daa32037a6ffd4ce3f168db81c0841f2bde68cc9 (diff) |
Update bundled zlib to version 1.2.12
The remaining diff to clean 1.2.12 is archived in the qtpatches.diff file.
Also this fixes CVE-2018-25032.
[ChangeLog][Third-Party Code] zlib was updated to version 1.2.12.
Pick-to: 5.15
Change-Id: Ifab5d57acdc90ace61f2fd22c6dbb7ec6b4ad319
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit a0a2bf2d95d4fcd468b6ce3c2e728d95425dd760)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty/zlib/src/gzread.c')
-rw-r--r-- | src/3rdparty/zlib/src/gzread.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/3rdparty/zlib/src/gzread.c b/src/3rdparty/zlib/src/gzread.c index 956b91ea7d..884c9bfe4c 100644 --- a/src/3rdparty/zlib/src/gzread.c +++ b/src/3rdparty/zlib/src/gzread.c @@ -1,5 +1,5 @@ /* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler + * Copyright (C) 2004-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -314,9 +314,9 @@ local z_size_t gz_read(state, buf, len) got = 0; do { /* set n to the maximum amount of len that fits in an unsigned int */ - n = -1; + n = (unsigned)-1; if (n > len) - n = len; + n = (unsigned)len; /* first just try copying data from the output buffer */ if (state->x.have) { @@ -397,7 +397,7 @@ int ZEXPORT gzread(file, buf, len) } /* read len or fewer bytes to buf */ - len = gz_read(state, buf, len); + len = (unsigned)gz_read(state, buf, len); /* check for an error */ if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR) @@ -447,7 +447,6 @@ z_size_t ZEXPORT gzfread(buf, size, nitems, file) int ZEXPORT gzgetc(file) gzFile file; { - int ret; unsigned char buf[1]; gz_statep state; @@ -469,8 +468,7 @@ int ZEXPORT gzgetc(file) } /* nothing there -- try gz_read() */ - ret = gz_read(state, buf, 1); - return ret < 1 ? -1 : buf[0]; + return gz_read(state, buf, 1) < 1 ? -1 : buf[0]; } int ZEXPORT gzgetc_(file) |