diff options
| author | Jonathan S <gereeter+code@gmail.com> | 2020-03-27 14:28:48 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-05-29 18:23:06 -0400 |
| commit | 631633b25253201968b97cf129d986def37eed4a (patch) | |
| tree | a09677ad9b9e71568c4ad384ac48a2a71710f628 /lib/std/os.zig | |
| parent | 4c8b937fb016a54b09d7447ca634b7cf1af78fce (diff) | |
| download | zig-631633b25253201968b97cf129d986def37eed4a.tar.gz zig-631633b25253201968b97cf129d986def37eed4a.zip | |
Document and reduce usage of MAX_PATH_BYTES, lifting arbitrary buffer size requirements
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index 22c884fce8..0fbffc822e 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -1236,6 +1236,8 @@ pub fn execvpeZ_expandArg0( if (mem.indexOfScalar(u8, file_slice, '/') != null) return execveZ(file, child_argv, envp); const PATH = getenvZ("PATH") orelse "/usr/local/bin:/bin/:/usr/bin"; + // Use of MAX_PATH_BYTES here is valid as the path_buf will be passed + // directly to the operating system in execveZ. var path_buf: [MAX_PATH_BYTES]u8 = undefined; var it = mem.tokenize(PATH, ":"); var seen_eacces = false; |
