Skip to content

Commit 17c90a7

Browse files
authored
Fix for #17277 (#21819)
Fixed adding a string with a large number of trailing zeros to StringBuilder, which sometimes caused the thread to hang
1 parent b3c6c43 commit 17c90a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Middleware/SpaServices.Extensions/src/Util/EventedStreamReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private async Task Run()
111111
// get the rest
112112
if (lineBreakPos < 0 && startPos < chunkLength)
113113
{
114-
_linesBuffer.Append(buf, startPos, chunkLength);
114+
_linesBuffer.Append(buf, startPos, chunkLength - startPos);
115115
}
116116
}
117117
}

0 commit comments

Comments
 (0)