rust-x-bindings / xkbcommon-rs

bindings and safe wrappers for libxkbcommon
MIT License
20 stars 24 forks source link

keymap: fix use-after-free #31

Closed Drakulix closed 2 years ago

Drakulix commented 2 years ago

This is a fix for 0.4.0.

let _ = ... drops immediately (different to let _unused = ...), which causes a use-after-free for any options passed to Keymap::new_from_names.

I would highly appreciate a 0.4.1 release with this fix, even if 0.5 is already in development, if that doesn't cause too much of a hassle. Thanks!

rtbo commented 2 years ago

@Drakulix I've created the branch 0.4.x. Please rebase your PR on that one.

Drakulix commented 2 years ago

I changed the target branch! :)

Drakulix commented 2 years ago

The target branch seems to contain the fix already from 0.5, I updated the PR to contains the suggested comment. Thanks for taking care of this so quickly, looking forward to 0.4.1!

rtbo commented 2 years ago

hum, in fact it was already fixed in this branch. But not released. I have to check if there is nothing breaking the 0.4.x but I don't think so. The main difference is the dependency to xcb-1.x.

rtbo commented 2 years ago

I have to check if there is nothing breaking the 0.4.x but I don't think so

Seems all good.

rtbo commented 2 years ago

0.4.1 is published.