read_remote() only treated -1 as a read error on the plaintext path, so
an end-of-file return of 0 left the buffer offsets unchanged and the
parse loop spun without making any progress. A remote that accepts the
connection and hangs up without sending a complete reply therefore
pinned a CPU until the connection timeout expired.
Treat a zero-length read as the closed connection it is. The identical
bug in the SSL_read() branch immediately above was fixed upstream in
2021; the plaintext branch was left behind, and is still reachable
whenever SECURETRANSFER is unset or STARTTLS is in use, since the
greeting before STARTTLS is read in the clear.
Signed-off-by: Nick Price <nprice@FreeBSD.org>