Permalink
Browse files

bugfix for uninitialized variable in ICMP6 validation reporting

  • Loading branch information...
1 parent 7cedff0 commit a2233ee4f785216b8d418b7aa2368cb8e1699805 @mrash committed Mar 24, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 psad
View
8 psad
@@ -8642,9 +8642,15 @@ sub print_scan_status() {
for my $code (keys %{$hr->{$type}}) {
for my $chain (keys %{$hr->{$type}->{$code}}) {
my $pkts = $hr->{$type}->{$code}->{$chain}->{'pkts'};
+ my $type_text = '';
+ if ($proto eq 'icmp') {
+ $type_text = $valid_icmp_types{$type}{'text'};
+ } else {
+ $type_text = $valid_icmp6_types{$type}{'text'};
+ }
push @lines, qq| Invalid | . uc($proto) .
qq| code: "$code" for | . uc($proto) .
- qq| "$valid_icmp_types{$type}{'text'}" packet | .
+ qq| "$type_text" packet | .
qq|Chain: $chain, Packets: $pkts\n|;
}
}

0 comments on commit a2233ee

Please sign in to comment.