harrie Thu Jul 24 17:48:56 2003 EDT
Modified files:
/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"
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.84 php-src/ext/snmp/snmp.c:1.85
--- php-src/ext/snmp/snmp.c:1.84 Wed Jul 16 05:28:47 2003
+++ php-src/ext/snmp/snmp.c Thu Jul 24 17:48:55 2003
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snmp.c,v 1.84 2003/07/16 09:28:47 sniper Exp $ */
+/* $Id: snmp.c,v 1.85 2003/07/24 21:48:55 harrie Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -580,7 +580,6 @@
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 @@
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