[interchange] Fix potential "use of uninitialized value" if called during startup
David Christensen <[email protected]> Thu, 22 Jun 2017 20:05:23 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit af6e71231e72eb42b88d4100b500e3d34e5a2adc Author: David Christensen <[email protected]> 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) )