diff --git a/src/DotNext.Tests/Buffers/SpanReaderWriterTests.cs b/src/DotNext.Tests/Buffers/SpanReaderWriterTests.cs index 75c0d4d51..47c2ae35b 100644 --- a/src/DotNext.Tests/Buffers/SpanReaderWriterTests.cs +++ b/src/DotNext.Tests/Buffers/SpanReaderWriterTests.cs @@ -443,7 +443,7 @@ public static void EncodeString(LengthFormat format) public static void WriteLengthPrefixedBytes(LengthFormat format) { ReadOnlySpan expected = [1, 2, 3]; - var buffer = new byte[expected.Length]; + var buffer = new byte[expected.Length + 5]; var writer = new SpanWriter(buffer); True(writer.Write(expected, format) > 0);