We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a5cbb3 commit d703157Copy full SHA for d703157
1 file changed
NtApiDotNet/NtObjectUtils.cs
@@ -73,7 +73,7 @@ internal static void WriteNulTerminated(this BinaryWriter writer, string str)
73
74
internal static byte[] ReadToEnd(this BinaryReader reader)
75
{
76
- return reader.ReadBytes(int.MaxValue);
+ return reader.ReadBytes((int)reader.RemainingLength());
77
}
78
79
internal static long RemainingLength(this Stream stm)
0 commit comments