summaryrefslogtreecommitdiff
path: root/networking/ftpgetput.c
diff options
context:
space:
mode:
authorEric Andersen2004-03-06 22:11:45 +0000
committerEric Andersen2004-03-06 22:11:45 +0000
commit2479445562a9b5a9f226d0b00c41dbd533e63213 (patch)
treee4891420283c085d688683a41cc217dc896917b8 /networking/ftpgetput.c
parentc4db0833a6c91dd3714bec1db076a80910af6e30 (diff)
downloadbusybox-2479445562a9b5a9f226d0b00c41dbd533e63213.zip
busybox-2479445562a9b5a9f226d0b00c41dbd533e63213.tar.gz
Fix/eliminate use of atol
Diffstat (limited to 'networking/ftpgetput.c')
-rw-r--r--networking/ftpgetput.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 4f6be11..17ee8a5 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -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')) {