diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2024-11-11 13:28:27 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-11-12 08:54:19 +1100 |
| commit | d86e505fad397251a8a618c545a7d78f43a70a34 (patch) | |
| tree | 75faa59c1fafa0e9b510b88e5eee12ec40fba3a8 /rc/tools | |
| parent | 919934177d6f3149b523c476ab41c37e1ba51034 (diff) | |
Fail rename-session instead of creating overlong socket paths
Commit 9cf8a3ccd (Check for buffer overflow when constructing the socket path., 2022-04-07)
made
$ kak -s $(printf %0100d)
fail but forgot to do the same for
$ kak -e "rename-session $(printf %0100d)"
which silently succeeds, only to fail at the next
$ echo nop | kak -p $(printf %0100d)
Fatal error: socket path too long: '/run/user/1000/kakoune/0000...'
Let's fail earlier.
While at it, don't validate "m_session" redundantly.
I'm not sure if we should validate the socket names in "kak -clear";
I guess it doesn't matter.
Diffstat (limited to 'rc/tools')
0 files changed, 0 insertions, 0 deletions
