netops.c
4.4 KB
-
netops: safely cast to int · f7597410
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.
Edward Thomson committed