On unices, a 0-length read indicates EOF, and the I/O implementation layer is responsible for translating that to an error, and I imagine that windows is fairly similar.

I'm not 100% certain that a 0-length read returning infinitely is impossible, but I'm fairly certain it won't happen.