mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
![neovim-backports[bot]](/assets/img/avatar_default.png)
Problem:
Calling `xstrdup` with a NULL pointer causes a SIGSEGV if `lua_tostring` returns
NULL in `nlua_luv_thread_common_cfpcall`.
Crash stack trace:
- `_platform_strlen` → `xstrdup` (memory.c:469)
- `nlua_luv_thread_common_cfpcall` (executor.c:281)
Solution:
Check if `lua_tostring` returns NULL and pass NULL to `event_create` to avoid the crash.
(cherry picked from commit a5b1b83a26
)
Co-authored-by: 林玮 (Jade Lin) <linw1995@icloud.com>