From df599006c0a805dda992910722ac69a9adf794fc Mon Sep 17 00:00:00 2001 From: Brandon Miller Date: Fri, 26 Sep 2025 08:33:48 -0400 Subject: Fix Rust LowLevelILFunction owner function method LowLevelILFunction objects can be constructed without a owner function. BNGetLowLevelILOwnerFunction can return NULL and must be checked before creating a Function object. --- plugins/warp/src/plugin/render_layer.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/warp/src/plugin/render_layer.rs') diff --git a/plugins/warp/src/plugin/render_layer.rs b/plugins/warp/src/plugin/render_layer.rs index 6c446e6f..3417c9b1 100644 --- a/plugins/warp/src/plugin/render_layer.rs +++ b/plugins/warp/src/plugin/render_layer.rs @@ -48,7 +48,11 @@ impl HighlightRenderLayer { llil: &LowLevelILRegularFunction, lines: &mut [DisassemblyTextLine], ) { - let relocatable_regions = relocatable_regions(&lifted_il.function().view()); + let Some(owner_function) = lifted_il.function() else { + return; + }; + + let relocatable_regions = relocatable_regions(&owner_function.view()); for line in lines { // We use address here instead of index since it's more reliable for other IL's. for lifted_il_instr in filtered_instructions_at(lifted_il, line.address) { -- cgit v1.3.1