Skip to content

Commit 618ef3e

Browse files
committed
Well that was an easy fix
1 parent c4d330f commit 618ef3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/src/Core/Amazon.Util/AWSSDKUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ public static string UrlEncode(int rfcNumber, string data, bool path)
10421042
var encodedByteLength = 2 * dataByteLength;
10431043
var dataBuffer = encodedByteLength <= MaxStackLimit
10441044
? stackalloc byte[MaxStackLimit]
1045-
: sharedDataBuffer = ArrayPool<byte>.Shared.Rent(dataByteLength);
1045+
: sharedDataBuffer = ArrayPool<byte>.Shared.Rent(encodedByteLength);
10461046
// Instead of stack allocating or renting two buffers we use one buffer with at least twice the capacity of the
10471047
// max encoding length. Then store the character data as bytes in the second half reserving the first half of the buffer
10481048
// for the encoded representation.

0 commit comments

Comments
 (0)