mirror of
https://github.com/radareorg/radare2.git
synced 2024-10-07 10:33:30 +00:00
Coverifix++
This commit is contained in:
parent
abd2fb5179
commit
ce9ece1177
@ -124,8 +124,10 @@ static RList *symbols(RBinFile *arch) {
|
||||
if (!(ptr = R_NEW0 (RBinSymbol)))
|
||||
break;
|
||||
coffname = r_coff_symbol_name (obj, &obj->symbols[i]);
|
||||
if (!coffname)
|
||||
if (!coffname) {
|
||||
free (ptr);
|
||||
break;
|
||||
}
|
||||
strncpy (ptr->name, coffname, R_BIN_SIZEOF_STRINGS);
|
||||
|
||||
strncpy (ptr->forwarder, "NONE", R_BIN_SIZEOF_STRINGS);
|
||||
|
@ -764,6 +764,7 @@ R_API void r_cons_highlight (const char *word) {
|
||||
I.buffer = res;
|
||||
I.buffer_len = I.buffer_sz = strlen (res);
|
||||
}
|
||||
free (rword);
|
||||
} else {
|
||||
free (I.highlight);
|
||||
I.highlight = NULL;
|
||||
|
@ -176,10 +176,9 @@ static int bin_strings (RCore *r, int mode, ut64 baddr, int va) {
|
||||
ut64 vaddr = r_bin_get_vaddr (bin, baddr,
|
||||
string->vaddr, string->paddr);
|
||||
ut64 paddr = string->paddr;
|
||||
q = strdup (string->string);
|
||||
if (maxstr && string->length>maxstr) {
|
||||
if (maxstr && string->length>maxstr)
|
||||
continue;
|
||||
}
|
||||
q = strdup (string->string);
|
||||
for (p=q; *p; p++) {
|
||||
if (*p=='"') *p = '\'';
|
||||
if (*p=='\\') *p = '/';
|
||||
|
@ -1720,11 +1720,11 @@ static boolt cmd_anal_refs(RCore *core, const char *input) {
|
||||
core->cons->pal.num);
|
||||
r_cons_printf ("%c 0x%"PFMT64x" %s\n",
|
||||
ref->type, ref->at, buf_asm);
|
||||
free (buf_asm);
|
||||
}
|
||||
}
|
||||
r_list_free (list);
|
||||
}
|
||||
free (buf_asm);
|
||||
}
|
||||
break;
|
||||
case 'F':
|
||||
|
@ -272,6 +272,7 @@ static void cmd_print_format (RCore *core, const char *_input, int len) {
|
||||
}
|
||||
r_list_free (files);
|
||||
}
|
||||
free (input);
|
||||
return;
|
||||
}
|
||||
/* syntax aliasing bridge for 'pf foo=xxd' -> 'pf.foo xxd' */
|
||||
|
@ -821,6 +821,7 @@ static int r_core_search_rop(RCore *core, ut64 from, ut64 to, int opt, const cha
|
||||
r_list_free (rx_list);
|
||||
r_list_free (end_list);
|
||||
r_list_free (badstart);
|
||||
r_list_free (list);
|
||||
return R_FALSE;
|
||||
}
|
||||
}
|
||||
@ -831,6 +832,7 @@ static int r_core_search_rop(RCore *core, ut64 from, ut64 to, int opt, const cha
|
||||
r_list_free (rx_list);
|
||||
r_list_free (end_list);
|
||||
r_list_free (badstart);
|
||||
r_list_free (list);
|
||||
return -1;
|
||||
}
|
||||
r_io_read_at (core->io, from, buf, delta);
|
||||
|
@ -2508,8 +2508,8 @@ R_API int r_core_print_disasm_json(RCore *core, ut64 addr, ut8 *buf, int nb_byte
|
||||
r_anal_xrefs_type_tostring (ref->type));
|
||||
}
|
||||
r_cons_printf ("]");
|
||||
r_list_free (xrefs);
|
||||
}
|
||||
r_list_free (xrefs);
|
||||
}
|
||||
|
||||
r_cons_printf ("}");
|
||||
|
@ -141,8 +141,10 @@ R_API RSearchKeyword *r_search_keyword_new_regexp (const char *str, const char *
|
||||
return NULL;
|
||||
|
||||
kw->bin_keyword = malloc (length+1);
|
||||
if (!kw->bin_keyword)
|
||||
if (!kw->bin_keyword) {
|
||||
free (kw);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kw->bin_keyword[length]=0;
|
||||
memcpy(kw->bin_keyword, str + start, length);
|
||||
|
Loading…
Reference in New Issue
Block a user