mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-24 23:06:36 +00:00
Fix some more null derefs related to the rbininfo change
This commit is contained in:
parent
e59719942c
commit
6e52324885
@ -241,6 +241,8 @@ R_API int r_asm_use(RAsm *a, const char *name) {
|
||||
char file[1024];
|
||||
RAsmPlugin *h;
|
||||
RListIter *iter;
|
||||
if (!a || !name)
|
||||
return R_FALSE;
|
||||
r_list_foreach (a->plugins, iter, h)
|
||||
if (!strcmp (h->name, name)) {
|
||||
if (!a->cur || (a->cur && strcmp (a->cur->arch, h->arch))) {
|
||||
|
@ -1343,7 +1343,8 @@ R_API RBinObject * r_bin_object_find_by_arch_bits (RBinFile *binfile, const char
|
||||
RBinInfo *info = NULL;
|
||||
r_list_foreach (binfile->objs, iter, obj) {
|
||||
info = obj->info;
|
||||
if (info && (bits == info->bits) &&
|
||||
if (info && info->arch && info->file &&
|
||||
(bits == info->bits) &&
|
||||
!strcmp (info->arch, arch) &&
|
||||
!strcmp (info->file, name)){
|
||||
break;
|
||||
|
@ -906,7 +906,7 @@ static int bin_symbols (RCore *r, int mode, ut64 baddr, ut64 laddr, int va, ut64
|
||||
int bin_demangle = r_config_get_i (r->config, "bin.demangle");
|
||||
const char *lang = r_config_get (r->config, "bin.lang");
|
||||
RBinInfo *info = r_bin_get_info (r->bin);
|
||||
int is_arm = info && !strcmp (info->arch, "arm");
|
||||
int is_arm = info && info->arch && !strcmp (info->arch, "arm");
|
||||
char str[R_FLAG_NAME_SIZE];
|
||||
RList *symbols;
|
||||
RListIter *iter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user