diff options
| author | Anatol Belski <ab@php.net> | 2016-01-04 17:07:37 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2016-01-04 17:07:37 +0100 |
| commit | a09e65d2b8998570ede0459329e5323afca1faaf (patch) | |
| tree | 5617c49e9cc1f7dacdcd72423293907df507470b /ext/ftp/ftp.c | |
| parent | 56bf10f0bd9a1b2d88b4cb2ac6e45ebf46925adc (diff) | |
| parent | 36b4311edd3e2dec31de1582c207e83b09d6f42b (diff) | |
| download | php-git-a09e65d2b8998570ede0459329e5323afca1faaf.tar.gz | |
Merge remote-tracking branch 'php/PHP-7.0' into PHP-7.0
* php/PHP-7.0: (115 commits)
Do not edit the value in place (might be relates to #71261)
Fixed bug #71264 (file_put_contents() returns unexpected value when filesystem runs full)
Duplicated i
remove duplicated skipif conditions
bump year which is missed in rev 49493a2
bump year which is missed in rev 49493a2
sync with new tests from 7.0 for ICU 55_1 and 56_1 compat
sync skipifs for ext/intl for ICU 55_* and 56_* compat
Update header to PHP Version 7
Happy new year (Update copyright to 2016)
Happy new year (Update copyright to 2016)
Happy new year (Update copyright to 2016)
Fixed bug #71249 (ldap_mod_replace/ldap_mod_add store value as string "Array")
Fixed test after fix lineno of finally
MFH: Fix lineno for finally FAST_CALL and JMP
This should be better
Fixed bug #71245 (file_get_contents() ignores "header" context option if it's a reference)
Fixed info while setting opcache.file_cache_only
Drop extra line
Add CVE for #71105 (PHP 7.0.1)
...
Diffstat (limited to 'ext/ftp/ftp.c')
| -rw-r--r-- | ext/ftp/ftp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index bb41b1a621..b3548e70da 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -754,10 +754,11 @@ ftp_pasv(ftpbuf_t *ftp, int pasv) memset(&ftp->pasvaddr, 0, n); sa = (struct sockaddr *) &ftp->pasvaddr; -#if HAVE_IPV6 if (getpeername(ftp->fd, sa, &n) < 0) { return 0; } + +#if HAVE_IPV6 if (sa->sa_family == AF_INET6) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa; char *endptr, delimiter; @@ -810,8 +811,9 @@ ftp_pasv(ftpbuf_t *ftp, int pasv) ipbox.c[n] = (unsigned char) b[n]; } sin = (struct sockaddr_in *) sa; - sin->sin_family = AF_INET; - sin->sin_addr = ipbox.ia[0]; + if (ftp->usepasvaddress) { + sin->sin_addr = ipbox.ia[0]; + } sin->sin_port = ipbox.s[2]; ftp->pasv = 2; |
