Skip to content

Commit

Permalink
deps: update zlib to 1.2.13.1-motley-2359864
Browse files Browse the repository at this point in the history
  • Loading branch information
nodejs-github-bot committed Sep 17, 2023
1 parent e9ff810 commit e4239f6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
13 changes: 7 additions & 6 deletions deps/zlib/google/zip_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,13 @@ zip_fileinfo TimeToZipFileInfo(const base::Time& file_time) {
// It assumes that dates below 1980 are in the double digit format.
// Hence the fail safe option is to leave the date unset. Some programs
// might show the unset date as 1980-0-0 which is invalid.
zip_info.tmz_date.tm_year = file_time_parts.year;
zip_info.tmz_date.tm_mon = file_time_parts.month - 1;
zip_info.tmz_date.tm_mday = file_time_parts.day_of_month;
zip_info.tmz_date.tm_hour = file_time_parts.hour;
zip_info.tmz_date.tm_min = file_time_parts.minute;
zip_info.tmz_date.tm_sec = file_time_parts.second;
zip_info.tmz_date = {
.tm_sec = static_cast<uInt>(file_time_parts.second),
.tm_min = static_cast<uInt>(file_time_parts.minute),
.tm_hour = static_cast<uInt>(file_time_parts.hour),
.tm_mday = static_cast<uInt>(file_time_parts.day_of_month),
.tm_mon = static_cast<uInt>(file_time_parts.month - 1),
.tm_year = static_cast<uInt>(file_time_parts.year)};
}

return zip_info;
Expand Down
16 changes: 8 additions & 8 deletions deps/zlib/google/zip_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ bool ZipReader::OpenEntry() {

// Construct the last modified time. The timezone info is not present in ZIP
// archives, so we construct the time as UTC.
base::Time::Exploded exploded_time = {};
exploded_time.year = info.tmu_date.tm_year;
exploded_time.month = info.tmu_date.tm_mon + 1; // 0-based vs 1-based
exploded_time.day_of_month = info.tmu_date.tm_mday;
exploded_time.hour = info.tmu_date.tm_hour;
exploded_time.minute = info.tmu_date.tm_min;
exploded_time.second = info.tmu_date.tm_sec;
exploded_time.millisecond = 0;
const base::Time::Exploded exploded_time = {
.year = static_cast<int>(info.tmu_date.tm_year),
.month =
static_cast<int>(info.tmu_date.tm_mon + 1), // 0-based vs 1-based
.day_of_month = static_cast<int>(info.tmu_date.tm_mday),
.hour = static_cast<int>(info.tmu_date.tm_hour),
.minute = static_cast<int>(info.tmu_date.tm_min),
.second = static_cast<int>(info.tmu_date.tm_sec)};

if (!base::Time::FromUTCExploded(exploded_time, &entry_.last_modified))
entry_.last_modified = base::Time::UnixEpoch();
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.23.0][]
* [uvwasi 0.0.16][]
* [V8 11.3.244.8][]
* [zlib 1.2.13.1-motley-f5fd0ad][]
* [zlib 1.2.13.1-motley-2359864][]

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.1-motley-f5fd0ad
### zlib 1.2.13.1-motley-2359864

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.1-motley-f5fd0ad]: #zlib-12131-motley-f5fd0ad
[zlib 1.2.13.1-motley-2359864]: #zlib-12131-motley-2359864

0 comments on commit e4239f6

Please sign in to comment.