mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
Fix last covs
This commit is contained in:
parent
af54e6513c
commit
cbeff990a1
@ -1,4 +1,4 @@
|
||||
/* radare2 - LGPL - Copyright 2013-2016 - pancake */
|
||||
/* radare2 - LGPL - Copyright 2013-2018 - pancake */
|
||||
|
||||
#include <getopt.c>
|
||||
#include <r_core.h>
|
||||
@ -78,13 +78,11 @@ int main(int argc, char **argv) {
|
||||
if (dodaemon) {
|
||||
#if LIBC_HAVE_FORK
|
||||
int pid = fork ();
|
||||
#else
|
||||
int pid = -1;
|
||||
#endif
|
||||
if (pid > 0) {
|
||||
printf ("%d\n", pid);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
s = r_socket_new (false);
|
||||
s->local = listenlocal;
|
||||
|
@ -552,7 +552,8 @@ INST_HANDLER (MOVWI_2) {
|
||||
e ("=[1],");
|
||||
}
|
||||
|
||||
static const PicMidrangeOpAnalInfo pic_midrange_op_anal_info[] = {
|
||||
#define PIC_MIDRANGE_OPINFO_LEN 26
|
||||
static const PicMidrangeOpAnalInfo pic_midrange_op_anal_info[PIC_MIDRANGE_OPINFO_LEN] = {
|
||||
INST_DECL (NOP, NONE), INST_DECL (RETURN, NONE),
|
||||
INST_DECL (RETFIE, NONE), INST_DECL (OPTION, NONE),
|
||||
INST_DECL (SLEEP, NONE), INST_DECL (CLRWDT, NONE),
|
||||
@ -639,9 +640,9 @@ static RIODesc *cpu_memory_map (RIOBind *iob, RIODesc *desc, ut32 addr,
|
||||
if (desc && iob->fd_get_name (iob->io, desc->fd)) {
|
||||
iob->fd_remap (iob->io, desc->fd, addr);
|
||||
} else {
|
||||
desc = iob->open_at (iob->io, mstr, R_IO_READ | R_IO_WRITE, 0,
|
||||
addr);
|
||||
desc = iob->open_at (iob->io, mstr, R_IO_READ | R_IO_WRITE, 0, addr);
|
||||
}
|
||||
free (mstr);
|
||||
return desc;
|
||||
}
|
||||
|
||||
@ -704,7 +705,7 @@ static int anal_pic_midrange_op (RAnal *anal, RAnalOp *op, ut64 addr,
|
||||
PicMidrangeOpcode opcode = pic_midrange_get_opcode (instr);
|
||||
PicMidrangeOpArgsVal args_val;
|
||||
|
||||
for (i = 0; i < sizeof (pic_midrange_op_anal_info); i++) {
|
||||
for (i = 0; i < PIC_MIDRANGE_OPINFO_LEN; i++) {
|
||||
if (pic_midrange_op_anal_info[i].opcode == opcode) {
|
||||
anal_pic_midrange_extract_args (
|
||||
instr, pic_midrange_op_anal_info[i].args,
|
||||
@ -718,8 +719,7 @@ static int anal_pic_midrange_op (RAnal *anal, RAnalOp *op, ut64 addr,
|
||||
return op->size;
|
||||
}
|
||||
|
||||
static void pic18_cond_branch (RAnalOp *op, ut64 addr, const ut8 *buf,
|
||||
char *flag) {
|
||||
static void pic18_cond_branch (RAnalOp *op, ut64 addr, const ut8 *buf, char *flag) {
|
||||
op->type = R_ANAL_OP_TYPE_CJMP;
|
||||
op->jump = addr + 2 + 2 * (*(ut16 *)buf & 0xff);
|
||||
op->fail = addr + op->size;
|
||||
|
@ -665,6 +665,7 @@ static ut64 r_num_tailff(RNum *num, const char *hex) {
|
||||
n = r_num_math (num, p);
|
||||
} else {
|
||||
eprintf ("Invalid argument\n");
|
||||
free (p);
|
||||
return UT64_MAX;
|
||||
}
|
||||
free (p);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* sdb - MIT - Copyright 2011-2016 - pancake */
|
||||
/* sdb - MIT - Copyright 2011-2018 - pancake */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -187,6 +187,9 @@ SDB_API char *sdb_querys (Sdb *r, char *buf, size_t len, const char *_cmd) {
|
||||
cmd = original_cmd = strdup (_cmd);
|
||||
if (!cmd) {
|
||||
free (out);
|
||||
if (bufset) {
|
||||
free (buf);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user