From 9796da8b3aa40a5f59db7ebf1a43e2c430ef3c47 Mon Sep 17 00:00:00 2001 From: Anton Kochkov Date: Tue, 13 Feb 2024 21:09:20 +0800 Subject: [PATCH 1/2] Update rizin to latest dev --- rizin | 2 +- src/common/Decompiler.cpp | 2 +- src/core/Cutter.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rizin b/rizin index ce88bbed49..fa455f8b52 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit ce88bbed49d1142fa33a57afee2ccfa62694f23b +Subproject commit fa455f8b5244ad0cebe2fa8aca1c71096f55dfa1 diff --git a/src/common/Decompiler.cpp b/src/common/Decompiler.cpp index 1868e4e4a1..2d9478e576 100644 --- a/src/common/Decompiler.cpp +++ b/src/common/Decompiler.cpp @@ -16,7 +16,7 @@ static char *jsonToStrdup(const CutterJson &str) if (!j || j->type != RZ_JSON_STRING) { return NULL; } - return rz_str_new(j->str_value); + return rz_str_dup(j->str_value); } static RzAnnotatedCode *parseJsonCode(CutterJson &json) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index baaa84108b..47fc607d5d 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -3430,7 +3430,7 @@ QList CutterCore::getAllSections() if (!hashnames) { return sections; } - rz_list_push(hashnames, rz_str_new("entropy")); + rz_list_push(hashnames, rz_str_dup("entropy")); for (const auto § : CutterPVector(sects)) { if (RZ_STR_ISEMPTY(sect->name)) continue; @@ -3778,8 +3778,8 @@ void CutterCore::setAnalysisMethod(const QString &className, const AnalysisMetho { CORE_LOCK(); RzAnalysisMethod analysisMeth; - analysisMeth.name = rz_str_new(meth.name.toUtf8().constData()); - analysisMeth.real_name = rz_str_new(meth.realName.toUtf8().constData()); + analysisMeth.name = rz_str_dup(meth.name.toUtf8().constData()); + analysisMeth.real_name = rz_str_dup(meth.realName.toUtf8().constData()); analysisMeth.addr = meth.addr; analysisMeth.vtable_offset = meth.vtableOffset; rz_analysis_class_method_set(core->analysis, className.toUtf8().constData(), &analysisMeth); From bce21c1d1ae61b9d9cf314df0afa91e1e65ef414 Mon Sep 17 00:00:00 2001 From: wargio Date: Tue, 13 Feb 2024 22:22:55 +0800 Subject: [PATCH 2/2] Use jsdec for rizin 0.7.0 --- dist/bundle_jsdec.ps1 | 4 ++-- scripts/jsdec.sh | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dist/bundle_jsdec.ps1 b/dist/bundle_jsdec.ps1 index a25d6ae62e..64466a7c4d 100644 --- a/dist/bundle_jsdec.ps1 +++ b/dist/bundle_jsdec.ps1 @@ -2,10 +2,10 @@ $dist = $args[0] $python = Split-Path((Get-Command python.exe).Path) if (-not (Test-Path -Path 'jsdec' -PathType Container)) { - git clone https://github.com/rizinorg/jsdec.git --depth 1 --branch "v0.6.0" + git clone https://github.com/rizinorg/jsdec.git --depth 1 --branch "v0.7.0" } cd jsdec -& meson.exe --buildtype=release -Dc_args=-DDUK_USE_DATE_NOW_WINDOWS -Djsc_folder=".." --prefix="$dist" p build +& meson.exe --buildtype=release --prefix="$dist" build ninja -C build install $ErrorActionPreference = 'Stop' $pathdll = "$dist\lib\rizin\plugins\core_pdd.dll" diff --git a/scripts/jsdec.sh b/scripts/jsdec.sh index 966c605a7c..c084133caf 100755 --- a/scripts/jsdec.sh +++ b/scripts/jsdec.sh @@ -6,14 +6,15 @@ SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")") cd "$SCRIPTPATH/.." -if [[ ! -d jsdec ]]; then - git clone https://github.com/rizinorg/jsdec.git --depth 1 --branch "v0.6.0" +if [ ! -d jsdec ]; then + git clone https://github.com/rizinorg/jsdec.git --depth 1 --branch "v0.7.0" fi cd jsdec -rm -rf build -mkdir build && cd build -meson --buildtype=release -Djsc_folder="../" "$@" ../p -ninja -ninja install +if [ -d build ]; then + rm -rf build +fi +meson --buildtype=release "$@" build +ninja -C build +ninja -C build install