From 92611cb9dc236c4471d3b2cf81609f434f35c30f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 9 Oct 2015 13:26:25 +0200 Subject: [PATCH] Fix two covertities --- libr/core/bin.c | 2 +- libr/core/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libr/core/bin.c b/libr/core/bin.c index f6576d92d8..d1b22f2e5b 100644 --- a/libr/core/bin.c +++ b/libr/core/bin.c @@ -818,7 +818,7 @@ static int bin_imports(RCore *r, int mode, int va, const char *name) { r_cons_printf (" classname=%s", import->classname); } r_cons_printf (" name=%s", import->name); - if (import->classname[0]) { + if (import->descriptor[0]) { r_cons_printf (" descriptor=%s", import->descriptor); } r_cons_printf ("\n"); diff --git a/libr/core/core.c b/libr/core/core.c index b7f55d053a..aa546b2b60 100644 --- a/libr/core/core.c +++ b/libr/core/core.c @@ -842,7 +842,7 @@ R_API char *r_core_anal_hasrefs(RCore *core, ut64 value) { r_strbuf_appendf (s, " (%s%s%s)", c, buf, cend); break; case 2: - r = r_utf8_encode_str ((const RRune *)widebuf, buf, + r = r_utf8_encode_str ((const RRune *)buf, widebuf, sizeof(widebuf) - 1); if (r == -1) { eprintf ("Something was wrong %s-%d\n",