diff options
Diffstat (limited to 'ext/ftp/ftp.c')
-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; } /* }}} */ |