diff --git a/tests/shared/src/BitVectorHelperTests.cpp b/tests/shared/src/BitVectorHelperTests.cpp index b7b5df32e5..8232394c03 100644 --- a/tests/shared/src/BitVectorHelperTests.cpp +++ b/tests/shared/src/BitVectorHelperTests.cpp @@ -34,7 +34,7 @@ static void readWriteHelper(const std::vector& src) { int numBits = (int)src.size(); int numBytes = calcBitVectorSize(numBits); uint8_t* bytes = new uint8_t[numBytes]; - memset(bytes, sizeof(uint8_t), numBytes); + memset(bytes, 0, numBytes); int numBytesWritten = writeBitVector(bytes, numBits, [&](int i) { return src[i]; });