mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 15:50:18 +00:00
fix(shim/hook): create an immutable slice for the buffer instead of a mutable one
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user