From: Perl 5 Porters Date: Sun, 25 Aug 1996 00:19:05 +0000 (+0000) Subject: perl 5.003_03: pod/perlipc.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=80aa68723ca7201f1a26665f8eaba212685e5869;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_03: pod/perlipc.pod Fix typo. Untaint port number. --- diff --git a/pod/perlipc.pod b/pod/perlipc.pod index 8ff9e3a..99379e9 100644 --- a/pod/perlipc.pod +++ b/pod/perlipc.pod @@ -494,7 +494,7 @@ instead. inet_ntoa($iaddr), "] at port $port"; - print CLIENT "Hello there, $name, it's now ", + print Client "Hello there, $name, it's now ", scalar localtime, "\n"; } @@ -515,6 +515,8 @@ go back to service a new client. my $port = shift || 2345; my $proto = getprotobyname('tcp'); + $port = $1 if $port =~ /(\d+)/; # untaint port number + socket(Server, PF_INET, SOCK_STREAM, $proto) || die "socket: $!"; setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)) || die "setsockopt: $!";