From 5eae4e229496b93bffd87ced180f54edda6c7327 Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Wed, 11 Dec 2024 22:55:43 +0100 Subject: [PATCH] fix --- utils/self-extracting-executable/decompressor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/self-extracting-executable/decompressor.cpp b/utils/self-extracting-executable/decompressor.cpp index 1a5cd35a369..ab8ea107907 100644 --- a/utils/self-extracting-executable/decompressor.cpp +++ b/utils/self-extracting-executable/decompressor.cpp @@ -345,10 +345,10 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress int read_exe_path(char *exe, size_t buf_sz) { uint32_t size = static_cast(buf_sz); - char apple[size]; - if (_NSGetExecutablePath(apple, &size) != 0) + std::vector apple(size); + if (_NSGetExecutablePath(apple.data(), &size) != 0) return 1; - if (realpath(apple, exe) == nullptr) + if (realpath(apple.data(), exe) == nullptr) return 1; return 0; }