Verify $port_request defined before scanning it for error purposes

This commit is contained in:
Keith Winstein
2012-11-09 11:56:28 -05:00
parent 3811249787
commit 05ec364b7d
+1 -1
View File
@@ -263,7 +263,7 @@ if ( $pid == 0 ) { # child
die "Bad MOSH CONNECT string: $_\n";
}
} else {
if ( $port_request =~ m{:} and m{Bad UDP port} ) {
if ( defined $port_request and $port_request =~ m{:} and m{Bad UDP port} ) {
$bad_udp_port_warning = 1;
}
print "$_\n";