Fix/eliminate use of atol

This commit is contained in:
Eric Andersen
2004-03-06 22:11:45 +00:00
parent c4db0833a6
commit 2479445562
9 changed files with 132 additions and 54 deletions

View File

@@ -147,7 +147,10 @@ static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream,
fd_data = xconnect_ftpdata(server, buf);
if (ftpcmd("SIZE ", server_path, control_stream, buf) == 213) {
filesize = atol(buf + 4);
unsigned long value=filesize;
if (safe_strtoul(buf + 4, &filesize))
bb_error_msg_and_die("SIZE error: %s", buf + 4);
filesize = value;
}
if ((local_path[0] == '-') && (local_path[1] == '\0')) {