Fixed adding a string with a large number of trailing zeros to StringBuilder, which sometimes caused the thread to hang
This commit is contained in:
Artyom Tarasov 2020-05-14 20:47:26 +03:00 committed by GitHub
parent b3c6c43789
commit 17c90a7e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ namespace Microsoft.AspNetCore.NodeServices.Util
// get the rest
if (lineBreakPos < 0 && startPos < chunkLength)
{
_linesBuffer.Append(buf, startPos, chunkLength);
_linesBuffer.Append(buf, startPos, chunkLength - startPos);
}
}
}