Mailing List Archive

[interchange] Fix potential "use of uninitialized value" if called during startup
commit af6e71231e72eb42b88d4100b500e3d34e5a2adc
Author: David Christensen <david@endpoint.com>
Date: Thu Jun 22 14:38:50 2017 -0500

Fix potential "use of uninitialized value" if called during startup

lib/Vend/File.pm | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/File.pm b/lib/Vend/File.pm
index 386ed74..6d9d4ee 100644
--- a/lib/Vend/File.pm
+++ b/lib/Vend/File.pm
@@ -707,10 +707,13 @@ sub allowed_file {
my $fn = shift;
my $write = shift;
my $status = 1;
+ my $pat;
$Vend::File::errstr = '';
if( $Global::NoAbsolute
and
- $fn !~ $Global::AllowedFileRegex->{$Vend::Cat}
+ $pat = $Global::AllowedFileRegex->{$Vend::Cat // ''}
+ and
+ $fn !~ $pat
and
absolute_or_relative($fn)
)

_______________________________________________
interchange-cvs mailing list
interchange-cvs@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs