From 758173e55b5d1d992fdc0f8394f576775659395e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Thu, 24 Jan 2019 23:29:56 +0100 Subject: [PATCH] Update r2 and fix for r_bin_file_hash() changes (#1143) --- radare2 | 2 +- src/Cutter.cpp | 10 +++++++++- src/Cutter.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/radare2 b/radare2 index 2032399c..b022c953 160000 --- a/radare2 +++ b/radare2 @@ -1 +1 @@ -Subproject commit 2032399ca89bda5539af120ee201f77b4564c1ba +Subproject commit b022c9533482a8f1c9ae825ced5c1a3e251837d9 diff --git a/src/Cutter.cpp b/src/Cutter.cpp index 4b4e15c7..e407e3da 100644 --- a/src/Cutter.cpp +++ b/src/Cutter.cpp @@ -374,7 +374,9 @@ bool CutterCore::loadFile(QString path, ut64 baddr, ut64 mapaddr, int perms, int r_core_cmd0 (core_, "omfg+w"); } - r_core_hash_load(core_, path.toUtf8().constData()); + ut64 hashLimit = getConfigut64("cfg.hashlimit"); + r_bin_file_hash(core_->bin, hashLimit, path.toUtf8().constData()); + fflush(stdout); return true; } @@ -640,6 +642,12 @@ int CutterCore::getConfigi(const char *k) return static_cast(r_config_get_i(core_->config, k)); } +ut64 CutterCore::getConfigut64(const char *k) +{ + CORE_LOCK(); + return r_config_get_i(core_->config, k); +} + bool CutterCore::getConfigb(const char *k) { CORE_LOCK(); diff --git a/src/Cutter.h b/src/Cutter.h index e518ddb5..333c1150 100644 --- a/src/Cutter.h +++ b/src/Cutter.h @@ -492,6 +492,8 @@ public: void setConfig(const QString &k, const QVariant &v) { setConfig(k.toUtf8().constData(), v); } int getConfigi(const char *k); int getConfigi(const QString &k) { return getConfigi(k.toUtf8().constData()); } + ut64 getConfigut64(const char *k); + ut64 getConfigut64(const QString &k) { return getConfigut64(k.toUtf8().constData()); } bool getConfigb(const char *k); bool getConfigb(const QString &k) { return getConfigb(k.toUtf8().constData()); } QString getConfig(const char *k);