Re-arrange the order of checks in the FL2_copyIMG to prioritise those checks with good signatures or checksums

pull/120/head
Hamish Coleman 5 years ago
parent 046597de6f
commit f89f7578af

@ -626,22 +626,25 @@ sub detect_img {
my $object;
if (!defined($object)) {
$object = FL2::prefix_ff->new($fh);
$object = FL2::prefix_head_EC->new($fh);
}
if (!defined($object)) {
$object = FL2::prefix_garbage->new($fh);
$object = FL1::PFH_header->new($fh);
}
if (!defined($object)) {
$object = FL2::prefix_nothing->new($fh);
$object = FL2::prefix_head_NAPI->new($fh);
}
# these checks have very little in the way of signatures, so only
# check for them after everything else
if (!defined($object)) {
$object = FL2::prefix_head_EC->new($fh);
$object = FL2::prefix_ff->new($fh);
}
if (!defined($object)) {
$object = FL1::PFH_header->new($fh);
$object = FL2::prefix_garbage->new($fh);
}
if (!defined($object)) {
$object = FL2::prefix_head_NAPI->new($fh);
$object = FL2::prefix_nothing->new($fh);
}
return $object;

Loading…
Cancel
Save