Fix last covs

This commit is contained in:
pancake 2018-05-21 11:32:37 +02:00
parent df9e7e551f
commit ceba14c612
4 changed files with 7 additions and 3 deletions

View File

@ -1174,6 +1174,7 @@ R_API void r_cons_highlight(const char *word) {
rword = malloc (word_len + linv[0] + linv[1] + 1);
if (!rword) {
free (cpos);
free (clean);
return;
}
strcpy (rword, inv[0]);

View File

@ -144,10 +144,10 @@ static int all_matches(const char *s, RRegex *rx, RList **mla, int *lines, int l
m.rm_eo = slen = strlen (clean);
r_list_purge (mla[l]);
while (!r_regex_exec (rx, clean, 1, &m, R_REGEX_STARTEND)) {
RRegexMatch *ms = R_NEW0 (RRegexMatch);
if (!cpos || m.rm_so >= ncpos) {
break;
}
RRegexMatch *ms = R_NEW0 (RRegexMatch);
ms->rm_so = cpos[m.rm_so];
ms->rm_eo = cpos[m.rm_eo];
r_list_append (mla[l], ms);

View File

@ -1767,6 +1767,9 @@ R_API void r_core_anal_importxrefs(RCore *core) {
RListIter *iter;
RBinImport *imp;
if (!obj) {
return;
}
r_list_foreach (obj->imports, iter, imp) {
ut64 addr = lit ? r_core_bin_impaddr (core->bin, va, imp->name): 0;
if (addr) {

View File

@ -34,13 +34,13 @@ R_API bool r_type_isenum(Sdb *TDB, const char *name) {
}
R_API RList* r_type_get_enum (Sdb *TDB, const char *name) {
RList *res = r_list_new ();
char *p, *val, var[128], var2[128];
int n;
if (!r_type_isenum (TDB, name)) {
return NULL;
}
RList *res = r_list_new ();
snprintf (var, sizeof (var), "enum.%s", name);
for (n = 0; (p = sdb_array_get (TDB, var, n, NULL)); n++) {
RTypeEnum *member = R_NEW0 (RTypeEnum);
@ -376,7 +376,7 @@ R_API void r_type_del(Sdb *TDB, const char *name) {
sdb_unset (TDB, name, 0);
} else if (!strcmp (kind, "enum")) {
RList *list = r_type_get_enum (TDB, name);
RTypeEnum *member = R_NEW0 (RTypeEnum);
RTypeEnum *member;
RListIter *iter;
r_list_foreach (list, iter, member) {
sdb_unset (TDB, sdb_fmt ("enum.%s.%s", name, member->name), 0);