[interchange] Fix potential "use of uninitialized value" if called during startup
David Christensen
interchange-cvs at icdevgroup.org
Thu Jun 22 20:05:23 UTC 2017
commit af6e71231e72eb42b88d4100b500e3d34e5a2adc
Author: David Christensen <david at 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)
)
More information about the interchange-cvs
mailing list