mkeckmkeck opened a new issue, #398: URL: https://github.com/apache/mina-sshd/issues/398
### Version 2.9.2 ### Bug description When passing len = 0 on a second read call, after eofIndicator has already be set to true, the read method returns -1. This can lead to an incomplete read when using e.g. java.io.InputStream#readAllBytes or java.io.InputStream#readNBytes(int). A possible solution would be a early return of 0 in case of len = 0 ### Actual behavior First reading offset 0, len 8192, then offset 8192, len 0 then offset 8192, len 8192 Return in sum at most 8192 bytes (if available) ### Expected behavior First reading offset 0, len 8192, then offset 8192, len 0 then offset 8192, len 8192 Return in sum more 8192 bytes (if available) ### Relevant log output _No response_ ### Other information _No response_ -- 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...@mina.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org