Skip to content

Commit e7bbac9

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #55857: ftp_size on large files
2 parents c4639a2 + e94126a commit e7bbac9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
?? ??? 2020, PHP 7.4.9
4+
5+
- FTP:
6+
. Fixed bug #55857 (ftp_size on large files). (cmb)
7+
38
?? ??? 2020, PHP 7.4.8
49

510
- Core:

ext/ftp/ftp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,8 @@ ftp_append(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *i
11331133
zend_long
11341134
ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len)
11351135
{
1136+
zend_long res;
1137+
11361138
if (ftp == NULL) {
11371139
return -1;
11381140
}
@@ -1145,7 +1147,8 @@ ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len)
11451147
if (!ftp_getresp(ftp) || ftp->resp != 213) {
11461148
return -1;
11471149
}
1148-
return atol(ftp->inbuf);
1150+
ZEND_ATOL(res, ftp->inbuf);
1151+
return res;
11491152
}
11501153
/* }}} */
11511154

0 commit comments

Comments
 (0)