Branch Coverage

blib/lib/Image/ExifTool/EXE.pm
Criterion Covered Total %
branch 97 204 47.5


line true false branch
918 0 0 unless $raf->Read($buff, 56) == 56 and $buff =~ /^ITSF.{20}\x10\xfd\x01\x7c\xaa\x7b\xd0\x11\x9e\x0c\0\xa0\xc9\x22\xe6\xec/s
935 0 22 if $end > length $$dataPt
940 22 287 if $ch eq "\0\0"
943 12 10 if $pos & 3
944 9 13 $et ? :
963 1 3 if $pos + 6 > $end
965 0 3 if $pos + $len > $end
968 0 3 unless $len or $valLen
970 0 3 if $strEnd + $valLen > $end
971 0 3 unless ($index or $string eq "VS_VERSION_INFO")
975 1 2 if ($string eq 'VS_VERSION_INFO') { }
1 1 elsif ($string eq 'StringFileInfo' and $valLen == 0) { }
989 0 10 unless $len
993 0 10 if $entryEnd > $end
996 1 9 unless ($index)
1002 1 0 if (length $string > 4)
1007 1 0 if $char
1012 9 0 if ($valLen) { }
1039 4 1 unless $addr >= $section->{'VirtualAddress'} and $addr < $section->{'VirtualAddress'} + $section->{'Size'}
1059 0 3 if $level > 10
1061 0 3 unless $raf->Seek($dirStart, 0) and $raf->Read($buff, 16) == 16
1065 0 3 if $count > 10000
1066 0 3 unless $raf->Read($buff, $count * 8) == $count * 8
1072 1 2 unless ($level)
1076 0 1 if ($verbose) { }
1079 0 1 unless $resType eq "Version"
1083 2 1 if ($entryPos & 2147483648) { }
1 0 elsif ($dirInfo->{'ResType'} eq 'Version' and $level == 2 and not $dirInfo->{'GotVersion'}) { }
1087 0 2 unless &ProcessPEResources($et, $dirInfo)
1094 0 1 unless $raf->Seek($entryPos + $base, 0) and $raf->Read($buf2, 16) == 16
1099 0 1 unless $fileOff
1100 0 1 unless $raf->Seek($fileOff, 0) and $raf->Read($buf2, $len) == $len
1101 0 1 unless &ProcessPEVersion($et, {"DataPt", \$buf2, "DataLen", $len, "DirStart", 0, "DirLen", $len})
1135 3 1 unless $name eq ".rsrc\0\0\0" and not $rsrcFound and defined($rsrcFound = 1) or $name eq ".text\0\0\0" and not %dirInfo
1147 1 0 if %dirInfo
1164 1 1 if ($override)
1165 0 1 $fat ? :
1187 3 1 if ($info)
1204 2 1 if ($doObj) { }
1229 0 6 unless my $size = $raf->Read($buff, 64)
1234 1 5 if ($buff =~ /^MZ/ and $size == 64) { }
2 3 elsif ($buff =~ /^(\xca\xfe\xba\xbe|\xfe\xed\xfa(\xce|\xcf)|(\xce|\xcf)\xfa\xed\xfe)/ and $size > 12) { }
0 3 elsif ($buff =~ /^Joy!peff/ and $size > 12) { }
2 1 elsif ($buff =~ /^\x7fELF/ and $size >= 16) { }
1 0 elsif ($buff =~ /^!\x0a/) { }
0 0 elsif ($buff =~ m[^#!\s*/\S*bin/(\w+)]) { }
1259 1 0 $cblp ? :
1263 0 1 if $fileSize < 64
1266 1 0 if ($raf->Seek($lfanew, 0) and $raf->Read($buff, 64) and $buff =~ /^(NE|PE|LE)/) { }
1267 0 1 if ($1 eq 'NE') { }
1 0 elsif ($1 eq 'PE') { }
1268 0 0 if ($size >= 64)
1271 0 0 $appFlags & 128 ? :
1285 1 0 if ($size >= 24)
1289 0 1 $machine =~ /64/ ? :
1290 0 1 $flags & 8192 ? :
1292 0 1 if $fast3
1297 1 0 if ($more > 0)
1298 1 0 if ($raf->Read($buf2, $more) == $more) { }
1303 0 1 unless ($magic == 263 or $magic == 267 or $magic == 523)
1326 0 1 $magic == 523 ? :
1328 1 0 if (length $buff >= $dirEntry + 8)
1334 0 1 unless $raf->Read($buff, 40 * $num) == 40 * $num
1336 0 1 unless &ProcessPEDict($et, \%dirInfo)
1339 0 0 unless $addr and $len < 2800 and $dirInfo{'Sections'} and $magic == 267 || $magic == 523
1342 0 0 unless $off and $raf->Seek($off, 0) and $raf->Read($buff, $len) == $len
1346 0 0 unless $type == 2 or $type == 4
1348 0 0 unless $n < 10000 and $raf->Seek($of, 0) and $raf->Read($buf2, $n) == $n
1349 0 0 if ($type == 2) { }
1350 0 0 unless $buf2 =~ /^(RSDS|NB10)/
1356 0 0 unless $n > 12
1358 0 0 if &Get32u(\$buf2, 8)
1381 0 2 if ($1 eq "\312\376\272\276") { }
2 0 elsif ($size >= 16) { }
1386 0 0 if ($ver > 30)
1392 0 0 if $fast3
1395 0 0 if ($more > 0)
1396 0 0 unless ($raf->Read($buf2, $more) == $more)
1413 0 0 if ($raf->Seek($offset, 0) and $raf->Read($buf2, 16) == 16) { }
1414 0 0 if ($buf2 =~ /^(\xfe\xed\xfa(\xce|\xcf)|(\xce|\xcf)\xfa\xed\xfe)/) { }
0 0 elsif ($buf2 =~ /^!\x0a/) { }
1415 0 0 $buf2 =~ /^\xfe\xed/ ? :
1433 0 2 if $fast3
1443 0 0 if $fast3
1460 0 2 if $fast3
1461 2 0 &Get8u(\$buff, 5) == 1 ? :
1475 1 1 if $override
1482 0 1 if $fast3
1488 0 2 unless $raf->Seek($pos, 0) and $raf->Read($buff, 60) == 60
1489 0 2 unless substr($buff, 58, 2) eq "`\n"
1490 1 1 unless ($tagTablePtr)
1500 2 0 if ($name =~ m[^#1/(\d+) *$])
1502 0 2 if $len > 256
1504 0 2 unless $raf->Read($name, $len) == $len
1507 0 2 unless $arSize =~ s/^(\d+).*/$1/s
1508 0 2 unless $raf->Read($buff, 28) == 28
1509 1 1 if &ExtractMachTags($et, \$buff)
1511 0 1 if $pos & 1
1519 0 0 if $prog eq "env" and $buff =~ /\b(perl|python|ruby|php)\b/
1529 0 0 $prog =~ /sh$/ ? :
0 0 unless defined $ext
1531 0 0 unless $type