Skip to content
Snippets Groups Projects
Commit 2096866e authored by deuce's avatar deuce
Browse files

Use atol() rather than atoi() for file length.

parent 723b1180
No related branches found
No related tags found
No related merge requests found
......@@ -198,8 +198,8 @@ int http_get_fd(char *URL, size_t *len, char *error)
close(s);
return(-1);
}
if(len != NULL && !strncasecmp(header,"content-length: ",16)) {
*len=atoi(header+16);
if(len != NULL && strncasecmp(header,"content-length:",15)==0) {
*len=atol(header+15);
}
}
return(s);
......
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