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
This commit is contained in:
parent
e8e5b5bb28
commit
8875abd9ab
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue