harrie Fri Jul 25 03:32:40 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/snmp snmp.c Log: 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) Index: php-src/ext/snmp/snmp.c diff -u php-src/ext/snmp/snmp.c:1.70.2.9 php-src/ext/snmp/snmp.c:1.70.2.10 --- php-src/ext/snmp/snmp.c:1.70.2.9 Wed Jul 16 02:04:01 2003 +++ php-src/ext/snmp/snmp.c Fri Jul 25 03:32:39 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: snmp.c,v 1.70.2.9 2003/07/16 06:04:01 sniper Exp $ */ +/* $Id: snmp.c,v 1.70.2.10 2003/07/25 07:32:39 harrie Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -575,7 +575,6 @@ 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 @@ 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;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php