Skip to content

Commit 8d3a1d8

Browse files
nodejs-github-botRafaelGSS
authored andcommitted
deps: update zlib to 1.2.13.1-motley-5daffc7
PR-URL: #50803 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 45b2bb0 commit 8d3a1d8

File tree

7 files changed

+23
-16
lines changed

7 files changed

+23
-16
lines changed

deps/zlib/crc32.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,8 @@ unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf,
792792
words = (z_word_t const *)buf;
793793

794794
/* Do endian check at execution time instead of compile time, since ARM
795-
processors can change the endianess at execution time. If the
796-
compiler knows what the endianess will be, it can optimize out the
795+
processors can change the endianness at execution time. If the
796+
compiler knows what the endianness will be, it can optimize out the
797797
check and the unused branch. */
798798
endian = 1;
799799
if (*(unsigned char *)&endian) {

deps/zlib/deflate.c

+5
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ local const config configuration_table[10] = {
168168
* bit values at the expense of memory usage). We slide even when level == 0 to
169169
* keep the hash table consistent if we switch back to level > 0 later.
170170
*/
171+
#if defined(__has_feature)
172+
# if __has_feature(memory_sanitizer)
173+
__attribute__((no_sanitize("memory")))
174+
# endif
175+
#endif
171176
local void slide_hash(deflate_state *s) {
172177
#if defined(DEFLATE_SLIDE_HASH_SSE2) || defined(DEFLATE_SLIDE_HASH_NEON)
173178
slide_hash_simd(s->head, s->prev, s->w_size, s->hash_size);

deps/zlib/gzguts.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# ifndef _LARGEFILE_SOURCE
88
# define _LARGEFILE_SOURCE 1
99
# endif
10-
# ifdef _FILE_OFFSET_BITS
11-
# undef _FILE_OFFSET_BITS
12-
# endif
10+
# undef _FILE_OFFSET_BITS
11+
# undef _TIME_BITS
1312
#endif
1413

1514
#ifdef HAVE_HIDDEN

deps/zlib/gzlib.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ int ZEXPORT gzbuffer(gzFile file, unsigned size) {
311311
/* check and set requested size */
312312
if ((size << 1) < size)
313313
return -1; /* need to be able to double it */
314-
if (size < 2)
315-
size = 2; /* need two bytes to check magic header */
314+
if (size < 8)
315+
size = 8; /* needed to behave well with flushing */
316316
state->want = size;
317317
return 0;
318318
}

deps/zlib/zlib.h

+8-5
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level);
230230
Initializes the internal stream state for compression. The fields
231231
zalloc, zfree and opaque must be initialized before by the caller. If
232232
zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
233-
allocation functions.
233+
allocation functions. total_in, total_out, adler, and msg are initialized.
234234
235235
The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
236236
1 gives best speed, 9 gives best compression, 0 gives no compression at all
@@ -382,7 +382,8 @@ ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
382382
read or consumed. The allocation of a sliding window will be deferred to
383383
the first call of inflate (if the decompression does not complete on the
384384
first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
385-
them to use default allocation functions.
385+
them to use default allocation functions. total_in, total_out, adler, and
386+
msg are initialized.
386387
387388
inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
388389
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
@@ -695,7 +696,7 @@ ZEXTERN int ZEXPORT deflateReset(z_streamp strm);
695696
This function is equivalent to deflateEnd followed by deflateInit, but
696697
does not free and reallocate the internal compression state. The stream
697698
will leave the compression level and any other attributes that may have been
698-
set unchanged.
699+
set unchanged. total_in, total_out, adler, and msg are initialized.
699700
700701
deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
701702
stream state was inconsistent (such as zalloc or state being Z_NULL).
@@ -820,8 +821,9 @@ ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm,
820821
gzip file" and give up.
821822
822823
If deflateSetHeader is not used, the default gzip header has text false,
823-
the time set to zero, and os set to 255, with no extra, name, or comment
824-
fields. The gzip header is returned to the default state by deflateReset().
824+
the time set to zero, and os set to the current operating system, with no
825+
extra, name, or comment fields. The gzip header is returned to the default
826+
state by deflateReset().
825827
826828
deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
827829
stream state was inconsistent.
@@ -960,6 +962,7 @@ ZEXTERN int ZEXPORT inflateReset(z_streamp strm);
960962
This function is equivalent to inflateEnd followed by inflateInit,
961963
but does not free and reallocate the internal decompression state. The
962964
stream will keep attributes that may have been set by inflateInit2.
965+
total_in, total_out, adler, and msg are initialized.
963966
964967
inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
965968
stream state was inconsistent (such as zalloc or state being Z_NULL).

doc/contributing/maintaining/maintaining-dependencies.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This a list of all the dependencies:
3131
* [undici 5.27.2][]
3232
* [uvwasi 0.0.19][]
3333
* [V8 11.8.172.12][]
34-
* [zlib 1.2.13.1-motley-dfc48fc][]
34+
* [zlib 1.2.13.1-motley-5daffc7][]
3535

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

314-
### zlib 1.2.13.1-motley-dfc48fc
314+
### zlib 1.2.13.1-motley-5daffc7
315315

316316
The [zlib](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/zlib)
317317
dependency lossless data-compression library,
@@ -349,4 +349,4 @@ performance improvements not currently available in standard zlib.
349349
[update-openssl-action]: ../../../.github/workflows/update-openssl.yml
350350
[uvwasi 0.0.19]: #uvwasi-0019
351351
[v8 11.8.172.12]: #v8-11817212
352-
[zlib 1.2.13.1-motley-dfc48fc]: #zlib-12131-motley-dfc48fc
352+
[zlib 1.2.13.1-motley-5daffc7]: #zlib-12131-motley-5daffc7

src/zlib_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// Refer to tools/dep_updaters/update-zlib.sh
33
#ifndef SRC_ZLIB_VERSION_H_
44
#define SRC_ZLIB_VERSION_H_
5-
#define ZLIB_VERSION "1.2.13.1-motley-dfc48fc"
5+
#define ZLIB_VERSION "1.2.13.1-motley-5daffc7"
66
#endif // SRC_ZLIB_VERSION_H_

0 commit comments

Comments
 (0)