diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-08-25 00:19:05 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-08-25 00:19:05 +0000 |
commit | 80aa68723ca7201f1a26665f8eaba212685e5869 (patch) | |
tree | 8a9b91d6d45e734ec4f0e680f50d0ce98536a743 | |
parent | 9eb01252778e483eefd606e6a5c0853b0f5eafd1 (diff) | |
download | perl-80aa68723ca7201f1a26665f8eaba212685e5869.tar.gz |
perl 5.003_03: pod/perlipc.pod
Fix typo.
Untaint port number.
-rw-r--r-- | pod/perlipc.pod | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pod/perlipc.pod b/pod/perlipc.pod index 8ff9e3a918..99379e9030 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: $!"; |