Skip to content

Commit 9c7fc8b

Browse files
author
Stefán J. Sigurðarson
committed
Fixing missing shortstr limit for netcoreapp3.1
1 parent 464bf09 commit 9c7fc8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/RabbitMQ.Client/client/impl/WireFormatting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ public static int WriteShortstr(Span<byte> span, string val)
733733
#if NETCOREAPP
734734
try
735735
{
736-
int bytesWritten = Encoding.UTF8.GetBytes(val, span.Slice(1));
736+
int bytesWritten = Encoding.UTF8.GetBytes(val, span.Slice(1, maxLength));
737737
span[0] = (byte)bytesWritten;
738738
return bytesWritten + 1;
739739
}

0 commit comments

Comments
 (0)