Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bfe7982

Browse filesBrowse files
nodejs-github-botruyadorno
authored andcommitted
deps: update zlib to 1.3.0.1-motley-7e2e4d7
PR-URL: #54432 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent 12b2ad4 commit bfe7982
Copy full SHA for bfe7982

File tree

Expand file treeCollapse file tree

5 files changed

+29
-27
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+29
-27
lines changed
Open diff view settings
Collapse file

‎deps/zlib/README.chromium‎

Copy file name to clipboardExpand all lines: deps/zlib/README.chromium
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Name: zlib
22
Short Name: zlib
33
URL: http://zlib.net/
44
Version: 1.3.0.1
5+
Revision: ac8f12c97d1afd9bafa9c710f827d40a407d3266
56
CPEPrefix: cpe:/a:zlib:zlib:1.3.0.1
67
Security Critical: yes
78
Shipped: yes
Collapse file

‎deps/zlib/google/zip_internal.cc‎

Copy file name to clipboardExpand all lines: deps/zlib/google/zip_internal.cc
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ struct ZipBuffer {
165165
// writing compressed data and it returns NULL for this case.)
166166
void* OpenZipBuffer(void* opaque, const void* /*filename*/, int mode) {
167167
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) != ZLIB_FILEFUNC_MODE_READ) {
168-
NOTREACHED_IN_MIGRATION();
169-
return NULL;
168+
NOTREACHED();
170169
}
171170
ZipBuffer* buffer = static_cast<ZipBuffer*>(opaque);
172171
if (!buffer || !buffer->data || !buffer->length)
@@ -196,8 +195,7 @@ uLong WriteZipBuffer(void* /*opaque*/,
196195
void* /*stream*/,
197196
const void* /*buf*/,
198197
uLong /*size*/) {
199-
NOTREACHED_IN_MIGRATION();
200-
return 0;
198+
NOTREACHED();
201199
}
202200

203201
// Returns the offset from the beginning of the data.
@@ -228,8 +226,7 @@ long SeekZipBuffer(void* opaque,
228226
buffer->offset = std::min(buffer->length, offset);
229227
return 0;
230228
}
231-
NOTREACHED_IN_MIGRATION();
232-
return -1;
229+
NOTREACHED();
233230
}
234231

235232
// Closes the input offset and deletes all resources used for compressing or
Collapse file

‎deps/zlib/google/zip_reader_unittest.cc‎

Copy file name to clipboardExpand all lines: deps/zlib/google/zip_reader_unittest.cc
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <string.h>
1010

1111
#include <iterator>
12+
#include <optional>
1213
#include <string>
1314
#include <string_view>
1415
#include <vector>
@@ -555,10 +556,10 @@ TEST_F(ZipReaderTest, ExtractToFileAsync_RegularFile) {
555556
const std::string md5 = base::MD5String(output);
556557
EXPECT_EQ(kQuuxExpectedMD5, md5);
557558

558-
int64_t file_size = 0;
559-
ASSERT_TRUE(base::GetFileSize(target_file, &file_size));
559+
std::optional<int64_t> file_size = base::GetFileSize(target_file);
560+
ASSERT_TRUE(file_size.has_value());
560561

561-
EXPECT_EQ(file_size, listener.current_progress());
562+
EXPECT_EQ(file_size.value(), listener.current_progress());
562563
}
563564

564565
TEST_F(ZipReaderTest, ExtractToFileAsync_Encrypted_NoPassword) {
Collapse file

‎deps/zlib/google/zip_unittest.cc‎

Copy file name to clipboardExpand all lines: deps/zlib/google/zip_unittest.cc
+20-17Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ bool CreateFile(const std::string& content,
6363
if (!base::CreateTemporaryFile(file_path))
6464
return false;
6565

66-
if (base::WriteFile(*file_path, content.data(), content.size()) == -1)
66+
if (!base::WriteFile(*file_path, content)) {
6767
return false;
68+
}
6869

6970
*file = base::File(
7071
*file_path, base::File::Flags::FLAG_OPEN | base::File::Flags::FLAG_READ);
@@ -350,7 +351,7 @@ class ZipTest : public PlatformTest {
350351
base::Time now_time;
351352
EXPECT_TRUE(base::Time::FromUTCExploded(now_parts, &now_time));
352353

353-
EXPECT_EQ(1, base::WriteFile(src_file, "1", 1));
354+
EXPECT_TRUE(base::WriteFile(src_file, "1"));
354355
EXPECT_TRUE(base::TouchFile(src_file, base::Time::Now(), test_mtime));
355356

356357
EXPECT_TRUE(zip::Zip(src_dir, zip_file, true));
@@ -748,6 +749,8 @@ TEST_F(ZipTest, UnzipMixedPaths) {
748749
"Space→", //
749750
#else
750751
" ", //
752+
"...", // Disappears on Windows
753+
"....", // Disappears on Windows
751754
"AUX", // Disappears on Windows
752755
"COM1", // Disappears on Windows
753756
"COM2", // Disappears on Windows
@@ -1113,9 +1116,9 @@ TEST_F(ZipTest, UnzipFilesWithIncorrectSize) {
11131116
SCOPED_TRACE(base::StringPrintf("Processing %d.txt", i));
11141117
base::FilePath file_path =
11151118
temp_dir.AppendASCII(base::StringPrintf("%d.txt", i));
1116-
int64_t file_size = -1;
1117-
EXPECT_TRUE(base::GetFileSize(file_path, &file_size));
1118-
EXPECT_EQ(static_cast<int64_t>(i), file_size);
1119+
std::optional<int64_t> file_size = base::GetFileSize(file_path);
1120+
EXPECT_TRUE(file_size.has_value());
1121+
EXPECT_EQ(static_cast<int64_t>(i), file_size.value());
11191122
}
11201123
}
11211124

@@ -1306,10 +1309,10 @@ TEST_F(ZipTest, Compressed) {
13061309

13071310
// Since the source files compress well, the destination ZIP file should be
13081311
// smaller than the source files.
1309-
int64_t dest_file_size;
1310-
ASSERT_TRUE(base::GetFileSize(dest_file, &dest_file_size));
1311-
EXPECT_GT(dest_file_size, 300);
1312-
EXPECT_LT(dest_file_size, 1000);
1312+
std::optional<int64_t> dest_file_size = base::GetFileSize(dest_file);
1313+
ASSERT_TRUE(dest_file_size.has_value());
1314+
EXPECT_GT(dest_file_size.value(), 300);
1315+
EXPECT_LT(dest_file_size.value(), 1000);
13131316
}
13141317

13151318
// Tests that a ZIP put inside a ZIP is simply stored instead of being
@@ -1338,10 +1341,10 @@ TEST_F(ZipTest, NestedZip) {
13381341
// Since the dummy source (inner) ZIP file should simply be stored in the
13391342
// destination (outer) ZIP file, the destination file should be bigger than
13401343
// the source file, but not much bigger.
1341-
int64_t dest_file_size;
1342-
ASSERT_TRUE(base::GetFileSize(dest_file, &dest_file_size));
1343-
EXPECT_GT(dest_file_size, src_size + 100);
1344-
EXPECT_LT(dest_file_size, src_size + 300);
1344+
std::optional<int64_t> dest_file_size = base::GetFileSize(dest_file);
1345+
ASSERT_TRUE(dest_file_size.has_value());
1346+
EXPECT_GT(dest_file_size.value(), src_size + 100);
1347+
EXPECT_LT(dest_file_size.value(), src_size + 300);
13451348
}
13461349

13471350
// Tests that there is no 2GB or 4GB limits. Tests that big files can be zipped
@@ -1402,10 +1405,10 @@ TEST_F(ZipTest, BigFile) {
14021405
// Since the dummy source (inner) ZIP file should simply be stored in the
14031406
// destination (outer) ZIP file, the destination file should be bigger than
14041407
// the source file, but not much bigger.
1405-
int64_t dest_file_size;
1406-
ASSERT_TRUE(base::GetFileSize(dest_file, &dest_file_size));
1407-
EXPECT_GT(dest_file_size, src_size + 100);
1408-
EXPECT_LT(dest_file_size, src_size + 300);
1408+
std::optional<int64_t> dest_file_size = base::GetFileSize(dest_file);
1409+
ASSERT_TRUE(dest_file_size.has_value());
1410+
EXPECT_GT(dest_file_size.value(), src_size + 100);
1411+
EXPECT_LT(dest_file_size.value(), src_size + 300);
14091412

14101413
LOG(INFO) << "Reading big ZIP " << dest_file;
14111414
zip::ZipReader reader;
Collapse file

‎src/zlib_version.h‎

Copy file name to clipboardExpand all lines: src/zlib_version.h
+1-1Lines changed: 1 addition & 1 deletion
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.3.0.1-motley-71660e1"
5+
#define ZLIB_VERSION "1.3.0.1-motley-7e2e4d7"
66
#endif // SRC_ZLIB_VERSION_H_

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.