diff options
| author | Harrie Hazewinkel <harrie@php.net> | 2003-07-25 07:32:39 +0000 |
|---|---|---|
| committer | Harrie Hazewinkel <harrie@php.net> | 2003-07-25 07:32:39 +0000 |
| commit | facd6c20c86806e2ed97444668f8c1dcb1e3fd72 (patch) | |
| tree | 5e520bb1b4776456aa977720ea8144f554792850 | |
| parent | 5e0da82b7f1c95dbf81bc40d091fefb154ad3bd2 (diff) | |
| download | php-git-facd6c20c86806e2ed97444668f8c1dcb1e3fd72.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"
(Bugfixing branch)
| -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 6f60f9fdd8..60e1c9e671 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -575,7 +575,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; @@ -892,7 +891,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; |
