Skip to content

Commit

Permalink
Fix potential "use of uninitialized value" if called during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christensen committed Jun 22, 2017
1 parent fbb4368 commit af6e712
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Vend/File.pm
Expand Up @@ -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)
)
Expand Down

0 comments on commit af6e712

Please sign in to comment.