Skip to content

Commit

Permalink
deps: update zlib to 1.2.13.1-motley-3ca9f16
Browse files Browse the repository at this point in the history
PR-URL: #48413
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
  • Loading branch information
nodejs-github-bot authored and RafaelGSS committed Jul 3, 2023
1 parent 89aaf16 commit bf0444b
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 13 deletions.
1 change: 0 additions & 1 deletion deps/zlib/OWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
agl@chromium.org
cavalcantii@chromium.org
cblume@chromium.org
noel@chromium.org
scroggo@google.com
1 change: 0 additions & 1 deletion deps/zlib/contrib/bench/OWNERS
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
noel@chromium.org
1 change: 0 additions & 1 deletion deps/zlib/contrib/tests/fuzzers/OWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cblume@chromium.org
hans@chromium.org
noel@chromium.org
6 changes: 6 additions & 0 deletions deps/zlib/contrib/tests/fuzzers/deflate_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
int ret =
deflateInit2(&stream, level, Z_DEFLATED, windowBits, memLevel, strategy);
ASSERT(ret == Z_OK);

size_t deflate_bound = deflateBound(&stream, src.size());

std::vector<uint8_t> compressed(src.size() * 2 + 1000);
stream.next_out = compressed.data();
stream.avail_out = compressed.size();
Expand All @@ -54,6 +57,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
compressed.resize(compressed.size() - stream.avail_out);
deflateEnd(&stream);

// Check that the bound was correct.
ASSERT(compressed.size() <= deflate_bound);

// Verify that the data decompresses correctly.
ret = inflateInit2(&stream, windowBits);
ASSERT(ret == Z_OK);
Expand Down
7 changes: 3 additions & 4 deletions deps/zlib/contrib/tests/infcover.cc
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,7 @@ void cover_support(void)
mem_setup(&strm);
strm.avail_in = 0;
strm.next_in = Z_NULL;
char versioncpy[] = ZLIB_VERSION;
versioncpy[0] -= 1;
ret = inflateInit_(&strm, versioncpy, (int)sizeof(z_stream));
ret = inflateInit_(&strm, "!", (int)sizeof(z_stream));
assert(ret == Z_VERSION_ERROR);
mem_done(&strm, "wrong version");

Expand Down Expand Up @@ -486,7 +484,8 @@ local unsigned pull(void *desc, unsigned char **buf)

local int push(void *desc, unsigned char *buf, unsigned len)
{
buf += len;
(void)buf;
(void)len;
return desc != Z_NULL; /* force error if desc not null */
}

Expand Down
2 changes: 1 addition & 1 deletion deps/zlib/zconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ typedef uLong FAR uLongf;
#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
# if defined(_WIN32) && !defined(__GNUC__)
# define z_off64_t __int64
# else
# define z_off64_t z_off_t
Expand Down
2 changes: 1 addition & 1 deletion deps/zlib/zconf.h.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ typedef uLong FAR uLongf;
#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
# if defined(_WIN32) && !defined(__GNUC__)
# define z_off64_t __int64
# else
# define z_off64_t z_off_t
Expand Down
2 changes: 1 addition & 1 deletion deps/zlib/zlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
Then no more input data should be provided before the deflateParams() call.
If this is done, the old level and strategy will be applied to the data
compressed before deflateParams(), and the new level and strategy will be
applied to the the data compressed after deflateParams().
applied to the data compressed after deflateParams().
deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
Expand Down
6 changes: 3 additions & 3 deletions doc/contributing/maintaining/maintaining-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This a list of all the dependencies:
* [undici 5.22.1][]
* [uvwasi 0.0.16][]
* [V8 11.3.244.8][]
* [zlib 1.2.13][]
* [zlib 1.2.13.1-motley-3ca9f16][]

Any code which meets one or more of these conditions should
be managed as a dependency:
Expand Down Expand Up @@ -311,7 +311,7 @@ See [maintaining-web-assembly][] for more informations.
high-performance JavaScript and WebAssembly engine, written in C++.
See [maintaining-V8][] for more informations.

### zlib 1.2.13
### zlib 1.2.13.1-motley-3ca9f16

The [zlib](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/zlib)
dependency lossless data-compression library,
Expand Down Expand Up @@ -349,4 +349,4 @@ performance improvements not currently available in standard zlib.
[update-openssl-action]: ../../../.github/workflows/update-openssl.yml
[uvwasi 0.0.16]: #uvwasi-0016
[v8 11.3.244.8]: #v8-1132448
[zlib 1.2.13]: #zlib-1213
[zlib 1.2.13.1-motley-3ca9f16]: #zlib-12131-motley-3ca9f16

0 comments on commit bf0444b

Please sign in to comment.