Skip to content

Commit f0e2e3c

Browse files
nodejs-github-botruyadorno
authored andcommittedSep 12, 2023
deps: update zlib to 1.2.13.1-motley-3ca9f16
PR-URL: #48413 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent b2bc839 commit f0e2e3c

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed
 

‎deps/zlib/OWNERS

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
agl@chromium.org
22
cavalcantii@chromium.org
33
cblume@chromium.org
4-
noel@chromium.org
54
scroggo@google.com

‎deps/zlib/contrib/bench/OWNERS

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
noel@chromium.org
-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
cblume@chromium.org
22
hans@chromium.org
3-
noel@chromium.org

‎deps/zlib/contrib/tests/fuzzers/deflate_fuzzer.cc

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
3838
int ret =
3939
deflateInit2(&stream, level, Z_DEFLATED, windowBits, memLevel, strategy);
4040
ASSERT(ret == Z_OK);
41+
42+
size_t deflate_bound = deflateBound(&stream, src.size());
43+
4144
std::vector<uint8_t> compressed(src.size() * 2 + 1000);
4245
stream.next_out = compressed.data();
4346
stream.avail_out = compressed.size();
@@ -54,6 +57,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
5457
compressed.resize(compressed.size() - stream.avail_out);
5558
deflateEnd(&stream);
5659

60+
// Check that the bound was correct.
61+
ASSERT(compressed.size() <= deflate_bound);
62+
5763
// Verify that the data decompresses correctly.
5864
ret = inflateInit2(&stream, windowBits);
5965
ASSERT(ret == Z_OK);

‎deps/zlib/contrib/tests/infcover.cc

+3-4
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,7 @@ void cover_support(void)
395395
mem_setup(&strm);
396396
strm.avail_in = 0;
397397
strm.next_in = Z_NULL;
398-
char versioncpy[] = ZLIB_VERSION;
399-
versioncpy[0] -= 1;
400-
ret = inflateInit_(&strm, versioncpy, (int)sizeof(z_stream));
398+
ret = inflateInit_(&strm, "!", (int)sizeof(z_stream));
401399
assert(ret == Z_VERSION_ERROR);
402400
mem_done(&strm, "wrong version");
403401

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

487485
local int push(void *desc, unsigned char *buf, unsigned len)
488486
{
489-
buf += len;
487+
(void)buf;
488+
(void)len;
490489
return desc != Z_NULL; /* force error if desc not null */
491490
}
492491

‎deps/zlib/zconf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ typedef uLong FAR uLongf;
539539
#if !defined(_WIN32) && defined(Z_LARGE64)
540540
# define z_off64_t off64_t
541541
#else
542-
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
542+
# if defined(_WIN32) && !defined(__GNUC__)
543543
# define z_off64_t __int64
544544
# else
545545
# define z_off64_t z_off_t

‎deps/zlib/zconf.h.cmakein

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ typedef uLong FAR uLongf;
526526
#if !defined(_WIN32) && defined(Z_LARGE64)
527527
# define z_off64_t off64_t
528528
#else
529-
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
529+
# if defined(_WIN32) && !defined(__GNUC__)
530530
# define z_off64_t __int64
531531
# else
532532
# define z_off64_t z_off_t

‎deps/zlib/zlib.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
728728
Then no more input data should be provided before the deflateParams() call.
729729
If this is done, the old level and strategy will be applied to the data
730730
compressed before deflateParams(), and the new level and strategy will be
731-
applied to the the data compressed after deflateParams().
731+
applied to the data compressed after deflateParams().
732732
733733
deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
734734
state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if

0 commit comments

Comments
 (0)
Please sign in to comment.