From bd8ba435cd81d54ee6019b0988172c91f4daceb9 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 20 Nov 2011 16:24:42 -0800 Subject: [PATCH] Avoid uninitialized value in hash element. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index ac8e59595..57bb36587 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -3025,9 +3025,13 @@ sub update_config_file( $ ) { my $annotate = shift; sub is_set( $ ) { - my $value = $config{$_[0]}; + my $option = $_[0]; + + if ( defined $option ) { + my $value = $config{$_[0]}; - defined( $value ) && lc( $value ) eq 'yes'; + defined( $value ) && lc( $value ) eq 'yes'; + } } my $wide = is_set $config{WIDE_TC_MARKS};