From c159e3e599d116e951417db46dc039ba691dac76 Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Wed, 18 Jun 2025 11:50:48 +0200 Subject: [PATCH] dot escaping --- TODO.md | 3 ++- androscalpel/src/code_analysis/method_cfg.rs | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 83b389d..6963313 100644 --- a/TODO.md +++ b/TODO.md @@ -4,8 +4,9 @@ - tests - https://source.android.com/docs/core/runtime/dex-format#system-annotation - goto size computation +- Check label duplication (maybe allow identical labels at the same address only?) - no nop when no payload - name register / parameters - fix flake -- fix python binding +- fix python binding or remove - clean repo diff --git a/androscalpel/src/code_analysis/method_cfg.rs b/androscalpel/src/code_analysis/method_cfg.rs index 0b5729c..996a3ec 100644 --- a/androscalpel/src/code_analysis/method_cfg.rs +++ b/androscalpel/src/code_analysis/method_cfg.rs @@ -266,7 +266,14 @@ impl<'a> MethodCFG<'a> { let block_name = if i == 0 { "ENTRY".into() } else if !node.labels.is_empty() { - format!("block '{}'", node.labels[0]) + format!( + "block '{}'", + node.labels[0] + .replace("&", "&") + .replace(">", ">") + .replace("<", "<") + .replace("\"", """) + ) } else { format!("block {i}") };