122 ENSURE_WRITTEN_BYTES(buffer, 10, 0, 0, 0x63, 0x69, 0xde, 0xad, 0xbe, 0xaf, 0, 0);
176#if defined(__clang__)
177#if __has_warning("-Wself-assign-overloaded")
178#pragma clang diagnostic push
179#pragma clang diagnostic ignored "-Wself-assign-overloaded"
183#if defined(__clang__)
184#if __has_warning("-Wself-assign-overloaded")
185#pragma clang diagnostic pop
242 ENSURE_WRITTEN_BYTES(buffer, 11, 0x30, 0x31, 0x32, 0, 0, 0xac, 0xad, 0xae, 0xaf, 0xba, 0xbb);
291 for (
uint32_t i = 0; i < actualSize; i++)
293 iter.
WriteU8(
static_cast<uint8_t
>(bytesRng->GetValue()));
299 iter.
Prev(chunkSize);
332 ENSURE_WRITTEN_BYTES(buffer, 9, 0x1, 0x2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3, 0x4);
337 ENSURE_WRITTEN_BYTES(other, 9, 0x1, 0x2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3, 0x4);
340 std::string ct(
"This is the next content of the buffer.");
344 i.
Write((
const uint8_t*)ct.c_str(), ct.size());
347 const uint8_t* evilBuffer = buffer.
PeekData();
349 auto cBuf = (uint8_t*)malloc(sizeBuffer);
352 for (
uint32_t i = 0; i < sizeBuffer; i++)
355 *(((
const uint8_t*)ct.c_str()) + i),
356 "Bad buffer copied data");