mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-09 07:42:25 +00:00
Fix null deref and bad indent
This commit is contained in:
parent
5b673030ff
commit
381d86de2a
@ -491,9 +491,8 @@ int main(int argc, char **argv) {
|
||||
datalen = 0;
|
||||
}
|
||||
code = malloc (strlen (p)+1);
|
||||
if (!code) {
|
||||
if (!code)
|
||||
return 1;
|
||||
}
|
||||
codelen = r_hex_str2bin (p, code);
|
||||
if (!arch) arch = "x86";
|
||||
if (!bits) bits = 32;
|
||||
|
@ -591,8 +591,10 @@ static RBuffer* create(RBin* bin, const ut8 *code, int codelen, const ut8 *data,
|
||||
ut16 ehdrsz, phdrsz;
|
||||
ut32 p_vaddr, p_paddr, p_fs, p_fs2;
|
||||
ut32 baddr;
|
||||
int is_arm = !strcmp (bin->cur->o->info->arch, "arm");
|
||||
int is_arm = 0;
|
||||
RBuffer *buf = r_buf_new ();
|
||||
if (bin && bin->cur && bin->cur->o && bin->cur->o->info)
|
||||
is_arm = !strcmp (bin->cur->o->info->arch, "arm");
|
||||
// XXX: hardcoded
|
||||
if (is_arm) {
|
||||
baddr = 0x40000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user