Branch Coverage

blib/lib/Image/ExifTool/FlashPix.pm
Criterion Covered Total %
branch 194 434 44.7


line true false branch
1240 0 0 if $val
1257 0 1 if $dirEnd < 4
1264 0 18 unless defined $value
1271 1 2 if length $vals[$i + 5]
1292 46 264 if ($flags)
1293 46 0 if ($flags == 4096) { }
1296 0 46 if ($valPos + $size > $dirEnd)
1301 0 46 if $count == 0
1309 101 209 unless ($format =~ /^VT_/)
1311 0 101 if ($valPos + $size > $dirEnd)
1323 0 216 if ($valPos + $size > $dirEnd)
1328 2 33 if ($noPad and defined $len and $len & 3)
1330 2 0 if ($valPos + $pad + $size <= $dirEnd)
1332 0 2 if substr($$dataPt, $valPos, $pad) eq "\0" x $pad
1336 24 192 if ($format eq 'VT_VARIANT') { }
50 142 elsif ($format eq 'VT_FILETIME') { }
0 142 elsif ($format eq 'VT_DATE') { }
117 25 elsif ($format =~ /STR$/) { }
2 23 elsif ($format eq 'VT_BLOB' or $format eq 'VT_CF') { }
23 0 elsif ($format eq 'VT_CLSID') { }
1340 0 24 unless defined $val
1348 49 1 if ($val > 365 * $secDay)
1354 0 49 if ($val < 0 or $val > $sec100yr)
1358 0 0 if ($v2 > 0 and $v2 < $sec100yr) { }
0 0 elsif ($val < 0 and $val + $unixTimeZero > 0) { }
1370 0 0 if $val != 0
1374 98 19 if $format eq "VT_LPWSTR"
1375 0 117 if ($valPos + $len + 4 > $dirEnd)
1380 98 19 if ($format eq 'VT_LPWSTR') { }
19 0 elsif ($codePage) { }
1385 19 0 if ($charset) { }
0 0 elsif ($codePage == 1200) { }
1395 29 88 $noPad ? :
1398 0 2 if ($valPos + $len + 4 > $dirEnd)
1413 0 209 if @vals > 1 and not wantarray
1418 0 310 if $type eq 0
1419 268 42 if (wantarray) { }
0 42 elsif (@vals > 1) { }
1446 0 0 if ($$dataPt =~ /^..\0+\xff\xff\x01\0\x0d\0CDocumentPage/s) { }
0 0 elsif ($$dataPt =~ /^\0{4}.(.{1,255})\x60\xa1\x3f\x22\0{5}(.{8})/gs) { }
1458 0 0 if ($$dataPt =~ /\G\x01\0{4}(.{12})/gs)
1462 0 0 if ($size and pos($$dataPt) + $size < length $$dataPt)
1474 0 0 if $index == 4294967295
1475 0 0 if $et->{'IeImg_lkup'}{$index}
1477 0 0 if $1
1484 0 0 if ($$dataPt =~ /<\0\?\0x\0p\0a\0c\0k\0e\0t\0 \0b\0e\0g\0i\0n\0=\0['"](\0\xff\xfe|\xfe\xff)/g)
1486 0 0 if ($$dataPt =~ /<\0\?\0x\0p\0a\0c\0k\0e\0t\0 \0e\0n\0d\0=\0['"]\0[wr]\0['"]\0\?\0>\0?/g)
1491 0 0 if $et->{'FILE_TYPE'} ne "FLA" and $et->{'VALUE'}{'Format'} and $et->{'VALUE'}{'Format'} eq "application/vnd.adobe.fla"
1494 0 0 if $isFLA
1505 0 0 unless my $dataPt = $dirInfo->{'DataPt'}
1508 0 0 unless ($dirLen > 2 and &Get16u($dataPt, 0) == 42476)
1515 0 0 if $pos + 2 > $dirLen
1518 0 0 if $pos + 2 > $dirLen
1521 0 0 if $pos + 2 > $dirLen
1524 0 0 if $pos + $n * 8 > $dirLen
1529 0 0 if $off + 8 > $n * 8
1561 0 1 $i ? :
1563 1 0 unless defined $offsets
1569 0 0 $j ? :
1570 0 0 unless defined $value->{$key}
1573 0 0 if ($tmp eq $doc)
1578 0 0 unless defined $docFlags
1579 0 0 $docFlags & 512 ? :
1582 0 0 $j ? :
1583 0 0 unless defined $value->{$key}
1586 0 0 if ($tmp eq $doc)
1591 0 0 unless defined $docTable
1596 0 0 unless @$offsets
1599 0 0 unless $len and $off + $len <= length $$docTable
1611 0 3 $i ? :
1612 3 0 unless defined $value->{$key}
1632 0 0 if $pos + $len * 2 > $end
1650 0 0 if $pos + 6 > $end
1655 0 0 if $pos + 2 > $end
1658 0 0 if $pos + $len * 2 > $end
1661 0 0 if $pos + 2 > $end
1664 0 0 if $pos + $len * 2 > $end
1681 2 23 if $bom == 65534
1682 0 23 unless $bom == 65279
1701 0 25 if ($dirLen < 48)
1706 0 25 unless (&CheckBOM($dataPt, $pos))
1712 0 25 if ($pos < 48)
1719 0 26 if $pos + 8 > $dirEnd
1722 0 26 unless $size
1724 0 26 if $verbose
1725 0 26 if ($pos + 8 + 8 * $numEntries > $dirEnd)
1735 0 269 if $valStart >= $dirEnd
1738 1 268 if ($tag == 0)
1742 0 6 if $valPos + 8 > $dirEnd
1746 0 6 if $valPos > $dirEnd
1749 0 6 unless length $name
1751 2 4 if $tagTablePtr->{$name}
1755 0 4 unless length $name
1756 0 4 if $verbose
1763 6 262 if (defined $dictionary{$tag})
1768 0 268 unless @vals
1769 4 264 @vals > 1 ? :
1773 46 222 if $flags
1777 26 242 if (not $custom and $tag == 1 || $tag == 2147483648) { }
56 186 elsif ($tagTablePtr->{$tag}) { }
184 4 elsif ($tagTablePtr->{'VARS'} and not $custom) { }
1781 26 0 if ($tag == 1)
1782 0 26 if $val < 0
1792 184 16 if ($masked->{$mask}{$tag & $mask})
1809 0 26 if $index < $numEntries
1810 24 2 unless $dirInfo->{'Multi'}
1823 0 6 unless $raf
1827 6 33 if $sect >= 4294967294
1828 0 33 if $loadedSect{$sect}
1831 0 33 unless $offset <= 2147483647 || $raf->{'LargeFileSupport'} and $raf->Seek($offset, 0) and $raf->Read($buff, $sectSize) == $sectSize
1836 0 33 if $sect * 4 > length($$fatPt) - 4
1854 0 67 if ($dirLen < 13)
1862 21 46 if ($type == 1) { }
46 0 elsif ($type == 2) { }
0 0 elsif ($type != 3) { }
1864 0 21 if $vers != 0
1865 0 21 if ($et->{'FPXR'})
1871 0 21 if $verbose
1875 0 48 if ($pos + 4 > $dirLen)
1884 0 48 unless ($$dataPt =~ m[\G(/\0(..)*?)\0\0]gs)
1890 0 48 if ($verbose)
1891 0 0 $size == 4294967295 ? :
1898 2 46 if ($size == 4294967295)
1899 0 2 unless ($$dataPt =~ /(.{16})/gs)
1908 25 23 unless ($tagTablePtr->{$name})
1912 23 2 if $name =~ /(.*) \d{6}$/s and $tagTablePtr->{$1} or $name =~ /(.*)_[0-9a-f]{16}$/s and $tagTablePtr->{$1}
1934 46 0 if ($fpxr and $fpxr->[$index]) { }
0 0 elsif ($index == 512 and $dirLen > 60 and $et->{'FujiPreview'} || $dirLen > 64 && substr($$dataPt, $dirStart + 60, 4) eq "\377\330\377\333") { }
1937 46 0 if (not defined $obj->{'Stream'}) { }
1945 0 0 if ($overlap < 0 or $dirLen - $overlap < 13) { }
1957 46 0 if ($len >= $obj->{'Size'})
1958 0 46 if $verbose
1959 0 46 if ($len > $obj->{'Size'})
1974 0 0 unless defined $et->{'FujiPreview'}
1979 0 0 if $index != 255
1989 21 46 if ($dirInfo->{'LastFPXR'})
1990 21 0 if ($et->{'FPXR'})
1993 48 0 unless defined $obj->{'Stream'} and length $obj->{'Stream'}
2002 0 21 if ($et->{'FujiPreview'})
2017 0 5 unless my $obj = $hier->{$index}
2018 0 5 if exists $obj->{'DocNum'}
2020 2 3 if $obj->{'Left'}
2021 1 4 if $obj->{'Right'}
2022 1 4 if (defined $obj->{'Child'})
2023 1 0 unless $used
2025 0 1 if $doc
2028 0 1 if ($meta) { }
0 1 elsif (@subDoc) { }
2051 0 1 unless $raf
2054 0 1 unless $raf->Read($buff, 512) == 512
2056 0 1 unless $buff =~ /^\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1/
2060 0 1 unless $fileType and $fpxFileType{$fileType}
2062 0 1 substr($buff, 28, 2) eq "\377\376" ? :
2078 0 1 if ($verbose)
2093 0 1 $sectSize > 512 ? :
2099 108 1 if $sect == 4294967295
2102 0 1 unless ($raf->Seek($offset, 0) and $raf->Read($fatSect, $sectSize) == $sectSize)
2111 1 0 if $difStart >= 4294967294
2113 0 0 if (++$difCountCheck > $difCount)
2117 0 0 if ($loadedDifSect{$difStart})
2122 0 0 unless ($raf->Seek($offset, 0) and $raf->Read($buff, $sectSize) == $sectSize)
2133 0 1 if ($fatCountCheck != $fatCount)
2141 0 1 unless (defined $miniFat and defined $dir)
2145 0 1 if ($verbose)
2156 0 1 if ($verbose)
2165 0 1 if $et->Options("ExtractEmbedded")
2172 3 5 if $type == 0
2173 0 5 if ($type > 5)
2181 3 2 if $len > 32
2185 0 5 if ($tag eq 0 and not defined $ee)
2192 1 4 unless ($miniStream)
2194 0 1 unless (defined $miniStreamBuff)
2202 3 2 if ($tagTablePtr->{$tag}) { }
0 2 elsif (defined $ee and $tag eq $ee) { }
2212 0 0 if $tag =~ /(.*) \d{6}$/s and $tagTablePtr->{$1} or $tag =~ /(.*)_[0-9a-f]{16}$/s and $tagTablePtr->{$1} or $tag =~ /(.*)_[0-9]{4}$/s and $tagTablePtr->{$1}
2221 4 1 unless $obj = $hier{$index}
2222 2 3 unless $lSib == 4294967295
2223 1 4 unless $rSib == 4294967295
2224 1 4 unless ($chld == 4294967295)
2226 1 0 unless $sub = $hier{$chld}
2230 2 3 unless defined $tagInfo or $verbose
2235 3 0 if ($typeStr eq 'STREAM') { }
0 0 elsif ($typeStr eq 'ROOT') { }
2236 0 3 if ($size >= $miniCutoff) { }
3 0 elsif ($size) { }
2245 0 3 unless (defined $buff)
2246 0 0 $tagInfo ? :
2257 0 3 if ($verbose)
2261 0 0 unless $lSib == 4294967295
2262 0 0 unless $rSib == 4294967295
2263 0 0 unless $chld == 4294967295
2264 0 0 if defined $size
2266 0 0 if not $tagInfo and $tag =~ /^[0-9a-f]{1,3}$/
2276 3 0 if (defined $tagInfo and $buff)
2278 2 1 if ($tagInfo and $tagInfo->{'SubDirectory'}) { }
0 1 elsif (defined $size and $size > length $buff) { }
2291 1 0 if defined $size and $size < length $buff
2292 0 1 if ($tag =~ /^IeImg_0*(\d+)$/) { }
0 1 elsif (not $tagInfo) { }
2297 0 0 if ($et->{'IeImg_lkup'} and $et->{'IeImg_lkup'}{$num})
2301 0 0 if ($et->{'IeImg_class'} and $et->{'IeImg_class'}{$num})
2309 0 0 if ($buff =~ /^(.{19,40})(\xff\xd8\xff\xe0|\x89PNG\r\n\x1a\n)/gs) { }
0 0 elsif ($buff =~ /^\0\x80\0\0\x01\0\0\0\x0e\0/ and length $buff > 18) { }
2310 0 0 $2 eq "\377\330\377\340" ? :
2314 0 0 if $len + 18 > length $buff
2330 1 0 unless ($et->{'DOC_NUM'})
2338 11 39 unless defined $num and $objIndex{$num}
2339 0 39 unless my $obj = $hier{$objIndex{$num}}
2341 39 0 unless $docNums and @$docNums
2343 0 0 unless $tag =~ / /
2349 0 0 unless defined $et->{'VALUE'}{$key}
2350 0 0 if $et->{'TAG_EXTRA'}{$key}{'G3'}
2361 0 1 if $verbose
2363 0 1 if ($et->{'FileType'} eq "FPX")
2365 0 0 if ($val)
2369 0 0 unless $val =~ /$pat/
2378 0 1 if ($et->{'IeImg_lkup'} and %{$et->{'IeImg_lkup'};})