dosfs: detect 0xE9 (JMP rel16) in BPB

This commit is contained in:
snow flurry 2020-11-17 22:20:08 -08:00
parent cd82b50889
commit d45aacdcf2
1 changed files with 2 additions and 1 deletions

View File

@ -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;