Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae0a0e46 authored by Florian Mayer's avatar Florian Mayer
Browse files

Fix SerializeFileDescriptor.

The string is not null terminated, so we cannot construct it from a
buffer without also passing the size.

Test: atest rustBinderSerializationTest
Change-Id: I7b16cda3aba873b345eef6062445e5c4bd3bfa8b
parent 27590051
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -381,7 +381,7 @@ TEST_F(SerializationTest, SerializeFileDescriptor) {
    string expected = "TestingFileDescriptors";
    vector<char> buf(expected.length());
    base::ReadFully(file_descriptors[0].release(), buf.data(), buf.size());
    ASSERT_EQ(expected, string(buf.data()));
    ASSERT_EQ(expected, string(buf.data(), expected.length()));
}

TEST_F(SerializationTest, SerializeIBinder) {