aboutsummaryrefslogtreecommitdiff
path: root/cuerecover.c
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-05-12 04:36:23 -0400
committerB. Watson <yalhcru@gmail.com>2020-05-12 04:36:23 -0400
commit571982345a32d7a2e31d664b59950792be5f21ea (patch)
treefb51805d55b416c61d536224381855326023768e /cuerecover.c
parent8c3d639fe85b0c73b6d7bcd608872832ac66ccb1 (diff)
downloadmiragextract-571982345a32d7a2e31d664b59950792be5f21ea.tar.gz
detect ECM files and abort
Diffstat (limited to 'cuerecover.c')
-rw-r--r--cuerecover.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cuerecover.c b/cuerecover.c
index 40698e3..89a7e7a 100644
--- a/cuerecover.c
+++ b/cuerecover.c
@@ -54,6 +54,11 @@ int looks_like_filesystem(const char *filename, FILE *f) {
return 0;
}
+ if(buf[0] == 'E' && buf[1] == 'C' && buf[2] == 'M') {
+ fprintf(stderr, "%s: file %s is ECM, use 'ecm2bin' to convert to raw bin\n", self, filename);
+ exit(1);
+ }
+
if(buf[0] == 'E' && buf[1] == 'R' && buf[3] == 0 && (buf[2] == 0x02 || buf[2] == 0x08))
{
have_apple_magic++;