summaryrefslogtreecommitdiff
path: root/rc/tools/python
diff options
context:
space:
mode:
authorChris Webb <chris@arachsys.com>2024-05-12 12:12:58 +0100
committerMaxime Coste <mawww@kakoune.org>2024-05-12 21:59:56 +1000
commit4e5631daf3a62bff1d7c4d2e697535ed4ebffcba (patch)
tree530a1c0eea3b0169a9ad36f6ee0d96b23fc37a7a /rc/tools/python
parent97a5d68adf48e99ac19dce21b32cecc7de9f0daa (diff)
Handle binary path detection errors on non-/proc platforms
On FreeBSD and NetBSD, sysctl() can return -1 when the path is too long, leaving the buffer unitialised. On macOS, both _NSGetExecutablePath() and realpath() can fail with pathological paths or if memory is exhausted. On Haiku, the kak_assert(status == B_OK) check will be compiled out in non-debug builds. Detect all of these cases and error out, reshaping get_kak_binary_path() to avoid multiple repetitions of the same fatal error message.
Diffstat (limited to 'rc/tools/python')
0 files changed, 0 insertions, 0 deletions