mirror of
https://github.com/radareorg/radare2.git
synced 2025-04-01 17:11:51 +00:00
Fix warning when loading fatmach from r2r
This commit is contained in:
parent
2e9cc2f1b2
commit
9a87db5b06
@ -453,7 +453,7 @@ static int parse_thread(struct MACH0_(obj_t)* bin, struct load_command *lc, ut64
|
||||
case CPU_TYPE_POWERPC:
|
||||
case CPU_TYPE_POWERPC64:
|
||||
if (flavor == X86_THREAD_STATE32) {
|
||||
if (ptr_thread + sizeof (struct ppc_thread_state32))
|
||||
if (ptr_thread + sizeof (struct ppc_thread_state32) > bin->size)
|
||||
return false;
|
||||
if ((len = r_buf_fread_at (bin->b, ptr_thread,
|
||||
(ut8*)&bin->thread_state.ppc_32, bin->endian?"40I":"40i", 1)) == -1) {
|
||||
@ -463,7 +463,7 @@ static int parse_thread(struct MACH0_(obj_t)* bin, struct load_command *lc, ut64
|
||||
pc = bin->thread_state.ppc_32.srr0;
|
||||
pc_offset = ptr_thread + r_offsetof(struct ppc_thread_state32, srr0);
|
||||
} else if (flavor == X86_THREAD_STATE64) {
|
||||
if (ptr_thread + sizeof (struct ppc_thread_state64))
|
||||
if (ptr_thread + sizeof (struct ppc_thread_state64) > bin->size)
|
||||
return false;
|
||||
if ((len = r_buf_fread_at (bin->b, ptr_thread,
|
||||
(ut8*)&bin->thread_state.ppc_64, bin->endian?"34LI3LI":"34li3li", 1)) == -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user