diff options
| author | Harrie Hazewinkel <harrie@php.net> | 2003-07-24 21:48:55 +0000 |
|---|---|---|
| committer | Harrie Hazewinkel <harrie@php.net> | 2003-07-24 21:48:55 +0000 |
| commit | 4d2229d6a3743715be0deb12d7c49a60452a5dc6 (patch) | |
| tree | 1677721cdbae57377b5ac0985f0dd5229c5ad753 | |
| parent | d7b37fa96bf63eb3b8cfaca7e49259dab340be86 (diff) | |
| download | php-git-4d2229d6a3743715be0deb12d7c49a60452a5dc6.tar.gz | |
Bug 24760 fix, in which the port number when non-default is not handled
correctly and ends up as the default port. This seems to be caused by
some buffer overflow where the port number is assign zero, even though
it it is not assigned to the port variable.
FIx was reported and a fix proposed by "chuck+php at 2003 dot snew dot com"
| -rw-r--r-- | ext/snmp/snmp.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 8ab63897f3..273fbc4699 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -580,7 +580,6 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) strcpy (hostname, Z_STRVAL_PP(a1)); if ((pptr = strchr (hostname, ':'))) { remote_port = strtol (pptr + 1, NULL, 0); - *pptr = 0; } session.peername = hostname; @@ -906,7 +905,6 @@ static void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st) strcpy(hostname, Z_STRVAL_PP(a1)); if ((pptr = strchr (hostname, ':'))) { remote_port = strtol (pptr + 1, NULL, 0); - *pptr = 0; } session.peername = hostname; session.remote_port = remote_port; |
