Merge "Fix ubsan error on unittest" am: b7e5a2246f am: dab9f37d4d

Change-Id: I9cb4ac036f06086be73e48be2b0c57db4faa1d25
This commit is contained in:
Treehugger Robot authored and Automerger Merge Worker committed 2020-03-23 20:47:03 +00:00
commit b7db0285a4
1 file changed
+2 -1
+2 -1
View File
@@ -178,8 +178,9 @@ TEST_F(ExtentsFileTest, ReadFailureFails) {
// A second read that fails will succeed if there was partial data read.
EXPECT_CALL(*mock_file_, Read(_, 10, _)).WillOnce(Return(false));
char* buf = reinterpret_cast<char*>(0x1234);
size_t bytes_read = 0;
EXPECT_TRUE(file.Read(nullptr, 100, &bytes_read));
EXPECT_TRUE(file.Read(buf, 100, &bytes_read));
EXPECT_EQ(1U, bytes_read);
}