From 3ef4c620911a5535c0bcdf6802aba2348eef70d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 08:29:24 +0000 Subject: [PATCH 1/2] Create draft PR for #419 From 35219b9edc4db6e107a78683982b46b469efb1fb Mon Sep 17 00:00:00 2001 From: Spartak Ehrlich Date: Wed, 19 Jun 2024 10:30:11 +0200 Subject: [PATCH 2/2] Fix: Only int in sections --- decompiler/frontend/binaryninja/handlers/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decompiler/frontend/binaryninja/handlers/constants.py b/decompiler/frontend/binaryninja/handlers/constants.py index d351a2a2e..633212b12 100644 --- a/decompiler/frontend/binaryninja/handlers/constants.py +++ b/decompiler/frontend/binaryninja/handlers/constants.py @@ -40,7 +40,7 @@ def lift_constant(self, constant: mediumlevelil.MediumLevelILConst, **kwargs): """Lift the given constant value.""" if constant.constant in [math.inf, -math.inf, math.nan]: return NotUseableConstant(str(constant.constant)) - if addr_in_section(constant.function.view, constant.constant): + if isinstance(constant.constant, int) and addr_in_section(constant.function.view, constant.constant): return self.lift_constant_pointer(constant) return Constant(constant.constant, vartype=self._lifter.lift(constant.expr_type))