NightOwl888 commented on code in PR #1173: URL: https://github.com/apache/lucenenet/pull/1173#discussion_r2325850760
########## src/Lucene.Net.Replicator/IndexInputInputStream.cs: ########## @@ -65,8 +65,8 @@ public override void SetLength(long value) public override int Read(byte[] buffer, int offset, int count) { - int remaining = (int)(input.Length - input.Position); // LUCENENET specific: Renamed from getFilePointer() to match FileStream - int readCount = Math.Min(remaining, count); + long remaining = input.Length - input.Position; // LUCENENET specific: Renamed from getFilePointer() to match FileStream Review Comment: Please add a comment that this is to fix an overflow problem so nobody is tempted to revert this when we upgrade. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org