Fixed wrong entrypoint offset in check() function for r_bin_bios

This commit is contained in:
Anton Kochkov 2013-06-10 02:33:33 +04:00
parent 5e0871485c
commit c53ae2712a

View File

@ -50,12 +50,11 @@ static RBinInfo* info(RBinArch *arch) {
} }
static int check(RBinArch *arch) { static int check(RBinArch *arch) {
const ut32 ep = 0x000ffff0; /* F000:FFF0 address */ if (arch->buf) {
if (arch->buf && arch->buf->length > ep) { const ut32 ep = arch->buf->length - 0x10000 + 0xfff0; /* F000:FFF0 address */
if (arch->buf->buf[0] == 0xff) if (arch->buf->buf[0] == 0xff)
/* Check if this a 'jmp' opcode */ /* Check if this a 'jmp' opcode */
if ((arch->buf->buf[ep] == 0xea) | if ((arch->buf->buf[ep] == 0xea) | (arch->buf->buf[ep] == 0xe9))
(arch->buf->buf[ep] == 0xe9))
return 1; return 1;
} }
return 0; return 0;