diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2026-09-18 05:50:39 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-09-18 05:51:33 +0000 |
| commit | f3226bc5eba53ce4b0306546e99f5928198526c3 (patch) | |
| tree | d414ca55b4ff8dc6089dae72f77b3e15cb410a3c | |
| parent | input: add log message when ignoring a keyboard_enter() with NULL surface (diff) | |
ime: ignore enter events with a NULL surface
Closes #2467
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | ime.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e60ffeaf..ac3422d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,8 +88,11 @@ * Use-after-free during shutdown when footclient and the client application exit simultaneously in a short window ([#2432][2432]). +* Crash when a buggy compositor sends an `ime_enter()` event with a + `NULL` surface ([#2467][2467]). [2342]: https://codeberg.org/dnkl/foot/pulls/2432 +[2342]: https://codeberg.org/dnkl/foot/issues/2467 ### Security @@ -55,6 +55,12 @@ static void enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, struct wl_surface *surface) { + if (unlikely(surface == NULL)) { + /* Seen on Hyprland */ + LOG_WARN("compositor sent ime_enter event with a NULL surface"); + return; + } + struct seat *seat = data; struct wl_window *win = wl_surface_get_user_data(surface); struct terminal *term = win->term; |
