enh: try harder to find RS02/RS03 sigs in non-exhaustive mode

Look at the extensive comments in the code for more context.
This commit is contained in:
Stéphane Lesimple
2021-01-20 13:20:54 +01:00
parent 355427b6e0
commit 9916ce74bc
99 changed files with 3765 additions and 99 deletions

View File

@@ -2707,7 +2707,13 @@ Image* OpenImageFromDevice(char *device, int query_only)
ExamineUDF(image);
read_capacity(image); /* Needed for ExamineECC() ! */
ExamineECC(image);
/* if we allow blank and we have no max size set, don't bother looking for ECC,
or ExamineECC could throw a Stop() and abort the operation */
if (query_only == 2 && image->dh->readCapacity == 0 && image->dh->userAreaSize == 0)
Verbose("Capacity is zero, skipping ExamineECC() as we allow blanks");
else
ExamineECC(image);
Verbose("# Calling query_size()\n");
dh->sectors = query_size(image);