source: trunk/dports/perl/p5-file-mmagic/files/patch-MMagic.pm @ 32566

Last change on this file since 32566 was 32566, checked in by ricci@…, 12 years ago

add patch to error check the result of readMagicLine()
bumped revision

File size: 409 bytes
Line 
1--- MMagic.pm.orig      2006-05-22 22:55:27.000000000 -0700
2+++ MMagic.pm   2007-09-10 10:57:21.000000000 -0700
3@@ -764,6 +764,11 @@
4     # this saves time otherwise wasted parsing unused subtests.
5     if (@$item == 3){
6         my $tmp = readMagicLine(@$item);
7+       if (!defined($tmp)) {
8+               # $tmp could be undef if we ran into troubles while reading
9+               #  the entry.
10+               return;
11+       }
12         @$item = @$tmp;
13     }
14 
Note: See TracBrowser for help on using the repository browser.