From 8241d6d7749ebd34d4e0dc44f9a80846eecf6894 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Thu, 30 Oct 2025 23:45:08 -0400 Subject: [PATCH] fix(shim/hook): create an immutable slice for the buffer instead of a mutable one --- src/integrations/shim/hook.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integrations/shim/hook.rs b/src/integrations/shim/hook.rs index 568835c..f28eaa6 100644 --- a/src/integrations/shim/hook.rs +++ b/src/integrations/shim/hook.rs @@ -112,7 +112,7 @@ impl SecurityHook { } // Construct a slice out of the file buffer and size. - let buffer = unsafe { std::slice::from_raw_parts_mut(file_buffer, file_size) }; + let buffer = unsafe { std::slice::from_raw_parts(file_buffer, file_size) }; // Construct a shim input from the path. let input = ShimInput::SecurityHookBuffer(Some(path), buffer);