1
0
Fork 0
forked from wry/wry

shm: limit data accessed by ClientMemOffset

This commit is contained in:
Julian Orth 2026-02-27 20:06:22 +01:00
parent 3f70242d32
commit 518095c7c2
7 changed files with 24 additions and 28 deletions

View file

@ -197,14 +197,15 @@ impl JayInput {
where
F: FnOnce(&Rc<KbvmMap>) -> Result<(), JayInputError>,
{
let len = len as _;
let cm = Rc::new(ClientMem::new_private(
keymap,
len as _,
len,
true,
Some(&self.client),
None,
)?)
.offset(0);
.offset(0, len);
let mut map = vec![];
cm.read(&mut map)?;
self.or_error(|| {