mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Fix one crash and one assert in the graph and remove one useless warning
This commit is contained in:
parent
4db87cb034
commit
786feaa80b
@ -406,7 +406,7 @@ R_API char *r_cons_canvas_to_string(RConsCanvas *c) {
|
||||
for (y = 0; y < c->h; y++) {
|
||||
olen += c->blen[y] + 1;
|
||||
}
|
||||
o = calloc (1, olen * (CONS_MAX_ATTR_SZ));
|
||||
o = calloc (1, olen * CONS_MAX_ATTR_SZ);
|
||||
if (!o) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -513,6 +513,7 @@ R_API bool r_core_bin_load(RCore *r, const char *filenameuri, ut64 baddr) {
|
||||
is_io_load = desc && desc->plugin;
|
||||
if (!filenameuri || !*filenameuri) {
|
||||
filenameuri = desc->name;
|
||||
#if 0
|
||||
} else if (desc->name && strcmp (filenameuri, desc->name)) {
|
||||
// XXX - this needs to be handled appropriately
|
||||
// if the cf does not match the filenameuri then
|
||||
@ -520,6 +521,7 @@ R_API bool r_core_bin_load(RCore *r, const char *filenameuri, ut64 baddr) {
|
||||
// new RCoreFile * should be opened.
|
||||
eprintf ("Error: The filenameuri '%s' is not the same as in RCoreFile: %s\n",
|
||||
filenameuri, desc->name);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
is_io_load = false;
|
||||
|
@ -3620,8 +3620,9 @@ R_API void r_agraph_reset(RAGraph *g) {
|
||||
r_graph_reset (g->graph);
|
||||
r_agraph_set_title (g, NULL);
|
||||
sdb_reset (g->db);
|
||||
r_list_purge (g->edges);
|
||||
|
||||
if (g->edges) {
|
||||
r_list_purge (g->edges);
|
||||
}
|
||||
g->nodes = sdb_new0 ();
|
||||
g->update_seek_on = NULL;
|
||||
g->x = g->y = g->w = g->h = 0;
|
||||
|
@ -303,7 +303,7 @@ R_API void r_cons_rainbow_new(int sz);
|
||||
|
||||
typedef void (*RConsEvent)(void *);
|
||||
|
||||
#define CONS_MAX_ATTR_SZ 15
|
||||
#define CONS_MAX_ATTR_SZ 16
|
||||
typedef struct r_cons_canvas_attr_t {
|
||||
//TODO add support for 256 colors.
|
||||
int loc;
|
||||
|
Loading…
Reference in New Issue
Block a user