diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-06-23 16:02:19 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-06-23 16:02:19 +0200 |
commit | 9bd648ba1e54c1f3dc8de19772a4f038fe9320a7 (patch) | |
tree | 31ce5a2e654e702cc58f7c0182fff1a4054dfcd3 /ext/ftp | |
parent | b981662855d06cce77e78d35ccbb6656b10bea22 (diff) | |
parent | e7bbac9d113625f0f63810d9ea00c6c798bbf2ed (diff) | |
download | php-git-9bd648ba1e54c1f3dc8de19772a4f038fe9320a7.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #55857: ftp_size on large files
Diffstat (limited to 'ext/ftp')
-rw-r--r-- | ext/ftp/ftp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index f47e0a6d49..5d41f063f8 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1131,6 +1131,8 @@ bail: zend_long ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len) { + zend_long res; + if (ftp == NULL) { return -1; } @@ -1143,7 +1145,8 @@ ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len) if (!ftp_getresp(ftp) || ftp->resp != 213) { return -1; } - return atol(ftp->inbuf); + ZEND_ATOL(res, ftp->inbuf); + return res; } /* }}} */ |