Skip to content

Commit 9bd648b

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #55857: ftp_size on large files
2 parents b981662 + e7bbac9 commit 9bd648b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/ftp/ftp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,8 @@ ftp_append(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *i
11311131
zend_long
11321132
ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len)
11331133
{
1134+
zend_long res;
1135+
11341136
if (ftp == NULL) {
11351137
return -1;
11361138
}
@@ -1143,7 +1145,8 @@ ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len)
11431145
if (!ftp_getresp(ftp) || ftp->resp != 213) {
11441146
return -1;
11451147
}
1146-
return atol(ftp->inbuf);
1148+
ZEND_ATOL(res, ftp->inbuf);
1149+
return res;
11471150
}
11481151
/* }}} */
11491152

0 commit comments

Comments
 (0)