Skip to content

Commit 1cc2ab3

Browse files
authored
Merge pull request #27 from lucasgl/master
Fix read string bigger than 128 bytes from Stream.
2 parents 5747489 + babfc56 commit 1cc2ab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LibObjectFile/ObjectFileStreamExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static string ReadStringUTF8NullTerminated(this Stream stream)
6060
break;
6161
}
6262

63-
if (textLength > buffer.Length)
63+
if (textLength >= buffer.Length)
6464
{
6565
var newBuffer = ArrayPool<byte>.Shared.Rent((int)textLength * 2);
6666
Array.Copy(buffer, 0, newBuffer, 0, buffer.Length);

0 commit comments

Comments
 (0)