diff --git a/src/meta/ea_eaac.c b/src/meta/ea_eaac.c index eaf593c8..1b21baf1 100644 --- a/src/meta/ea_eaac.c +++ b/src/meta/ea_eaac.c @@ -198,7 +198,8 @@ VGMSTREAM * init_vgmstream_ea_abk_new(STREAMFILE *streamFile) { goto fail; version = read_32bitBE(0x04, streamFile); - if (version != 0x01010202) + if (version != 0x01010100 && + version != 0x01010202) goto fail; /* use table offset to check endianness */ @@ -221,6 +222,9 @@ VGMSTREAM * init_vgmstream_ea_abk_new(STREAMFILE *streamFile) { bnk_target_index = 0xFFFF; ast_offset = 0; + if (!bnk_offset || read_32bitBE(bnk_offset, streamFile) != 0x53313041) /* "S10A" */ + goto fail; + /* set up some common values */ if (header_table_offset == 0x5C) { /* the usual variant */ diff --git a/src/meta/ea_schl.c b/src/meta/ea_schl.c index efbf8110..dedc9823 100644 --- a/src/meta/ea_schl.c +++ b/src/meta/ea_schl.c @@ -199,6 +199,12 @@ VGMSTREAM * init_vgmstream_ea_abk(STREAMFILE *streamFile) { target_entry_offset = 0; total_sound_tables = 0; + /* check to avoid clashing with the newer ABK format */ + if (bnk_offset && + read_32bitBE(bnk_offset, streamFile) != EA_BNK_HEADER_LE && + read_32bitBE(bnk_offset, streamFile) != EA_BNK_HEADER_BE) + goto fail; + for (i = 0; i < num_tables; i++) { num_entries = read_8bit(header_table_offset + 0x24, streamFile); base_offset = read_32bit(header_table_offset + 0x2C, streamFile);