From 571982345a32d7a2e31d664b59950792be5f21ea Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 12 May 2020 04:36:23 -0400 Subject: detect ECM files and abort --- cuerecover.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cuerecover.c') 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++; -- cgit v1.2.3