Skip to content

Commit

Permalink
Verify $port_request defined before scanning it for error purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw committed Nov 9, 2012
1 parent 3811249 commit 05ec364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mosh
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 05ec364

Please sign in to comment.