Commit f75974105db108150892a743c69e8adbf23bb14f

Edward Thomson 2019-05-21T10:57:30

netops: safely cast to int Only read at most INT_MAX from the underlying stream, so that we can accurately return the number of bytes read. Since callers are not guaranteed to get as many bytes as requested (due to availability of input), this is safe and callers should call in a loop until EOF.