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

The tured parameter to read() is size_t, not uint.

parent 8e92ccb4
No related branches found
No related tags found
1 merge request!123New file base
Pipeline #1788 passed
......@@ -1455,7 +1455,7 @@ static off_t sock_sendfile(http_session_t *session,char *path, off_t start, off_
else {
remain=-1L;
}
while((i=read(file, buf, (uint)(remain>sizeof(buf)?sizeof(buf):remain)))>0) {
while((i=read(file, buf, (size_t)(remain>sizeof(buf)?sizeof(buf):remain)))>0) {
if(writebuf(session,buf,i)!=i) {
lprintf(LOG_WARNING,"%04d !ERROR sending %s",session->socket,path);
close(file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment