diff --git a/deps/zlib/OWNERS b/deps/zlib/OWNERS index ecffb59f051501..3a821578a748b3 100644 --- a/deps/zlib/OWNERS +++ b/deps/zlib/OWNERS @@ -1,5 +1,4 @@ agl@chromium.org cavalcantii@chromium.org cblume@chromium.org -noel@chromium.org scroggo@google.com diff --git a/deps/zlib/contrib/bench/OWNERS b/deps/zlib/contrib/bench/OWNERS index f1e3d4f472e484..e69de29bb2d1d6 100644 --- a/deps/zlib/contrib/bench/OWNERS +++ b/deps/zlib/contrib/bench/OWNERS @@ -1 +0,0 @@ -noel@chromium.org diff --git a/deps/zlib/contrib/tests/fuzzers/OWNERS b/deps/zlib/contrib/tests/fuzzers/OWNERS index 0ae52574020a3d..ff3256199006fd 100644 --- a/deps/zlib/contrib/tests/fuzzers/OWNERS +++ b/deps/zlib/contrib/tests/fuzzers/OWNERS @@ -1,3 +1,2 @@ cblume@chromium.org hans@chromium.org -noel@chromium.org diff --git a/deps/zlib/contrib/tests/fuzzers/deflate_fuzzer.cc b/deps/zlib/contrib/tests/fuzzers/deflate_fuzzer.cc index ad1a985c68334a..64892bc5539e3b 100644 --- a/deps/zlib/contrib/tests/fuzzers/deflate_fuzzer.cc +++ b/deps/zlib/contrib/tests/fuzzers/deflate_fuzzer.cc @@ -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 compressed(src.size() * 2 + 1000); stream.next_out = compressed.data(); stream.avail_out = compressed.size(); @@ -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); diff --git a/deps/zlib/contrib/tests/infcover.cc b/deps/zlib/contrib/tests/infcover.cc index 2ab0a4bec28b1d..4c55d5d7d5f5e0 100644 --- a/deps/zlib/contrib/tests/infcover.cc +++ b/deps/zlib/contrib/tests/infcover.cc @@ -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"); @@ -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 */ } diff --git a/deps/zlib/zconf.h b/deps/zlib/zconf.h index 2f2956b13e6afd..4f2ebbb755e433 100644 --- a/deps/zlib/zconf.h +++ b/deps/zlib/zconf.h @@ -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 diff --git a/deps/zlib/zconf.h.cmakein b/deps/zlib/zconf.h.cmakein index 9cc20bfb6ce74b..310c43928a299f 100644 --- a/deps/zlib/zconf.h.cmakein +++ b/deps/zlib/zconf.h.cmakein @@ -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 diff --git a/deps/zlib/zlib.h b/deps/zlib/zlib.h index c5ce1c1ccba491..014331fc8dc33f 100644 --- a/deps/zlib/zlib.h +++ b/deps/zlib/zlib.h @@ -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 diff --git a/doc/contributing/maintaining/maintaining-dependencies.md b/doc/contributing/maintaining/maintaining-dependencies.md index 93f14cb123c0d2..710ad4fbbe775a 100644 --- a/doc/contributing/maintaining/maintaining-dependencies.md +++ b/doc/contributing/maintaining/maintaining-dependencies.md @@ -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: @@ -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, @@ -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