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; }