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

Commit 8875abd9 authored by David Anderson's avatar David Anderson
Browse files

libsnapshot: Fix crash in MakeXorBlockString test.

std::string doesn't like being initialized with negative values, so use
memset() instead.

Bug: 208944665
Test: vts_libsnapshot_test
Change-Id: I42a1a01fd9e59ffc9913c9df9f4bb8ab85113356
parent e8e5b5bb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -155,8 +155,8 @@ class OfflineSnapshotTest : public ::testing::Test {
    }

    std::string MakeXorBlockString() {
        std::string data(100, -1);
        data.resize(kBlockSize, 0);
        std::string data(kBlockSize, 0);
        memset(data.data(), 0xff, 100);
        return data;
    }