Skip to content
Snippets Groups Projects
Commit 8b8e70ac authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Actually we only need to not pass rd, SSIZE_MAX doesn't matter

parent dc6a8901
No related branches found
No related tags found
1 merge request!488Overhaul LZH code
Pipeline #7532 passed
......@@ -196,8 +196,8 @@ off_t sendfilesocket(int sock, int file, off_t *offset, off_t count)
for (i = wr = 0; i < rd; i += wr) {
wr = sendsocket(sock,buf+i,rd-i);
if (wr > 0) {
if ((SSIZE_MAX - i) < wr)
wr = SSIZE_MAX - i;
if ((rd - i) < wr)
wr = rd - i;
continue;
}
if (wr == SOCKET_ERROR && SOCKET_ERRNO == EWOULDBLOCK) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment