Coverifix

This commit is contained in:
jvoisin 2015-02-28 14:32:30 +01:00
parent f681866124
commit 600c6cfaf2
5 changed files with 11 additions and 5 deletions

View File

@ -55,9 +55,9 @@ static int trace_hook_mem_read(RAnalEsil *esil, ut64 addr, ut8 *buf, int len) {
sdb_array_add_num (DB, KEY ("mem.read"), addr, 0);
r_hex_bin2str (buf, len, hexbuf);
sdb_set (DB, KEYAT ("mem.read.data", addr), hexbuf, 0);
eprintf ("[ESIL] MEM READ 0x%08"PFMT64x" %s\n", addr, hexbuf);
free (hexbuf);
eprintf ("[ESIL] MEM READ 0x%08"PFMT64x" %s\n", addr, hexbuf);
if (ocbs.hook_mem_read) {
RAnalEsilCallbacks cbs = esil->cb;
esil->cb = ocbs;
@ -73,8 +73,9 @@ static int trace_hook_mem_write(RAnalEsil *esil, ut64 addr, const ut8 *buf, int
sdb_array_add_num (DB, KEY ("mem.write"), addr, 0);
r_hex_bin2str (buf, len, hexbuf);
sdb_set (DB, KEYAT ("mem.write.data", addr), hexbuf, 0);
free (hexbuf);
eprintf ("[ESIL] MEM WRITE 0x%08"PFMT64x" %s\n", addr, hexbuf);
free (hexbuf);
if (ocbs.hook_mem_write) {
RAnalEsilCallbacks cbs = esil->cb;
esil->cb = ocbs;

View File

@ -1086,6 +1086,8 @@ static EDemanglerErr parse_microsoft_mangled_name( char *sym,
char *ptr64 = 0;
char *storage_class = 0;
type_code_str.type_str = NULL;
if (!init_type_code_str_struct(&func_str)) {
err = eDemanglerErrMemoryAllocation;
goto parse_microsoft_mangled_name_err;

View File

@ -2231,8 +2231,10 @@ static void cmd_anal_trace(RCore *core, const char *input) {
{
RAnalOp *op;
ut64 addr = r_num_math (core->num, input +2);
if (!addr) addr = core->offset;
if (!addr)
addr = core->offset;
op = r_core_anal_op (core, addr);
if (op)
r_anal_esil_trace (core->anal->esil, op);
r_anal_op_free (op);
}

View File

@ -1113,6 +1113,7 @@ R_API int r_print_format(RPrint *p, ut64 seek, const ut8* b, const int len,
if (size == -1) i++;
else
i+=size;
free (oarg);
continue;
case 'p': // pointer reference
tmp = (p->bits == 64)? 'q': 'x';

View File

@ -1077,7 +1077,7 @@ R_API char **r_str_argv(const char *cmdline, int *_argc) {
return NULL;
argv = malloc (argv_len * sizeof (char *));
args = malloc (strlen (cmdline) * sizeof (char *)); // Unescaped args will be shorter, so strlen (cmdline) will be enough
args = malloc (strlen (cmdline) * sizeof (char)); // Unescaped args will be shorter, so strlen (cmdline) will be enough
do {
// States for parsing args
int escaped = 0;