Fix #5766 - null deref in av

This commit is contained in:
pancake 2016-09-15 19:24:46 +02:00
parent 798959bd6f
commit f0466624f6

View File

@ -4642,8 +4642,14 @@ static bool anal_fcn_data_gaps (RCore *core, const char *input) {
}
static void r_anal_virtual_functions(void *core, const char* input) {
const char *curArch = ((RCore *)core)->bin->cur->o->info->arch;
if (!strcmp (curArch, "x86")) {
const char *curArch = NULL;
if (core) {
RCore *c = (RCore*)core;
if (c->bin && c->bin->cur && c->bin->cur->o && c->bin->cur->o->info) {
curArch = c->bin->cur->o->info->arch;
}
}
if (curArch && !strcmp (curArch, "x86")) {
const char * help_msg[] = {
"Usage:", "av ", "analyze the .rodata section and list virtual function present",
NULL};