From d45aacdcf25b98d90f4144bfab77d4983b4dc85f Mon Sep 17 00:00:00 2001 From: snow flurry Date: Tue, 17 Nov 2020 22:20:08 -0800 Subject: [PATCH] dosfs: detect 0xE9 (JMP rel16) in BPB --- src/dosfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dosfs.c b/src/dosfs.c index e428457..71abc22 100644 --- a/src/dosfs.c +++ b/src/dosfs.c @@ -34,7 +34,8 @@ open_image(const char *path, int flags, dosfs_t *fsd) return errno; } - if (fsd->ib.jmp[0] != 0xEB || fsd->ib.jmp[2] != 0x90) { + if ((fsd->ib.jmp[0] != 0xEB || fsd->ib.jmp[2] != 0x90) && /* JMP rel8 */ + fsd->ib.jmp[0] != 0xE9) { /* JMP rel16 */ DPRINTF(("hm... doesn't look like a FAT image?\n")); close(ifd); return EOPNOTSUPP;