summaryrefslogtreecommitdiff
path: root/networking/ftpgetput.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ftpgetput.c')
-rw-r--r--networking/ftpgetput.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index fa18549..3773f99 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -124,7 +124,8 @@ int ftp_receive(ftp_host_info_t *server, FILE *control_stream,
fd_data = xconnect_ftpdata(server, buf);
if (ftpcmd("SIZE ", server_path, control_stream, buf) == 213) {
- if (SAFE_STRTOOFF(buf + 4, &filesize))
+ filesize = BB_STRTOOFF(buf + 4, NULL, 10);
+ if (errno || filesize < 0)
bb_error_msg_and_die("SIZE error: %s", buf + 4);
} else {
filesize = -1;