From 787cec4fe7926fa397ba3bd70e0ba34b8879e90d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 16 Mar 2010 07:12:39 -0700 Subject: [PATCH] Fix 'uninitialized variable' bug in Config::copy2 Bug reported by Tuomo Soini Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 242c27572..09b18fff3 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1221,7 +1221,7 @@ sub copy2( $ ) { ################################################################################ EOF - print $script $_ unless /^\s*$/; + print $script $_ if defined && ! /^\s*$/; while ( ) { chomp;