mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-12 17:48:33 +00:00
Fixed wrong entrypoint offset in check() function for r_bin_bios
This commit is contained in:
parent
5e0871485c
commit
c53ae2712a
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user