Skip to content

Commit d7b31ac

Browse files
GauthamBanasandraaajisaka
authored andcommitted
HDFS-15949. Fix integer overflow (#2857)
Reviewed-by: Inigo Goiri <inigoiri@apache.org> Signed-off-by: Akira Ajisaka <aajisaka@apache.org> (cherry picked from commit 36014b8)
1 parent 8b4b3d6 commit d7b31ac

File tree

1 file changed

+2
-2
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests

1 file changed

+2
-2
lines changed

hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/hdfs_ext_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,11 @@ TEST_F(HdfsExtTest, TestHosts) {
453453
EXPECT_EQ(0, errno);
454454

455455
//Test invalid arguments
456-
EXPECT_EQ(nullptr, hdfsGetHosts(fs, filename.c_str(), 0, std::numeric_limits<int64_t>::max()+1));
456+
EXPECT_EQ(nullptr, hdfsGetHosts(fs, filename.c_str(), 0, std::numeric_limits<int64_t>::min()));
457457
EXPECT_EQ((int) std::errc::invalid_argument, errno);
458458

459459
//Test invalid arguments
460-
EXPECT_EQ(nullptr, hdfsGetHosts(fs, filename.c_str(), std::numeric_limits<int64_t>::max()+1, std::numeric_limits<int64_t>::max()));
460+
EXPECT_EQ(nullptr, hdfsGetHosts(fs, filename.c_str(), std::numeric_limits<int64_t>::min(), std::numeric_limits<int64_t>::max()));
461461
EXPECT_EQ((int) std::errc::invalid_argument, errno);
462462
}
463463

0 commit comments

Comments
 (0)