fix(shim/hook): create an immutable slice for the buffer instead of a mutable one

This commit is contained in:
2025-10-30 23:45:08 -04:00
parent c3e883c121
commit 8241d6d774

View File

@@ -112,7 +112,7 @@ impl SecurityHook {
} }
// Construct a slice out of the file buffer and size. // 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. // Construct a shim input from the path.
let input = ShimInput::SecurityHookBuffer(Some(path), buffer); let input = ShimInput::SecurityHookBuffer(Some(path), buffer);