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"
strcpy (hostname, Z_STRVAL_PP(a1));
if ((pptr = strchr (hostname, ':'))) {
remote_port = strtol (pptr + 1, NULL, 0);
- *pptr = 0;
}
session.peername = hostname;
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;