# HG changeset patch # User IBBoard # Date 1526115912 -3600 # Node ID 808462de684aefd458189490846539b051c9f463 # Parent 1b605c38b375857b04b581d98bbaab38d4c95784 Handle possible "undef" from FileMagic that causes warnings diff -r 1b605c38b375 -r 808462de684a common/spamassassin-vba-macro-master/ole2macro.pm --- a/common/spamassassin-vba-macro-master/ole2macro.pm Mon May 07 09:40:41 2018 +0100 +++ b/common/spamassassin-vba-macro-master/ole2macro.pm Sat May 12 10:05:12 2018 +0100 @@ -121,7 +121,7 @@ if ($has_mimeinfo){ my $contents_scalar = new IO::Scalar \$part->decode($mime_max_read_size); my $mime_type = File::MimeInfo::Magic::magic($contents_scalar); - return($mime_type eq "application/zip"); + return(defined $mime_type && $mime_type eq "application/zip"); }else{ return($name =~ /(?:zip)$/); }