diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2016-11-17 19:49:17 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2016-11-17 19:49:17 +0000 |
commit | a62e1640bcafbb82d86ea8d8ce057a83c4683d60 (patch) | |
tree | b2e99365eb00070fd5b51f45d9cbb14fb1a17fd4 /Src/builtin.c | |
parent | 297471cf7737c4dfe8097988b8a5bd61872df837 (diff) | |
download | zsh-a62e1640bcafbb82d86ea8d8ce057a83c4683d60.tar.gz zsh-a62e1640bcafbb82d86ea8d8ce057a83c4683d60.tar.xz zsh-a62e1640bcafbb82d86ea8d8ce057a83c4683d60.zip |
39958: Add extra byte to PATH_MAX allocations.
This ensures we've got enough space for a null, although this isn't always needed.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 696971944..d3c628592 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -973,7 +973,7 @@ cd_do_chdir(char *cnam, char *dest, int hard) * Normalize path under Cygwin to avoid messing with * DOS style names with drives in them */ - static char buf[PATH_MAX]; + static char buf[PATH_MAX+1]; #ifdef HAVE_CYGWIN_CONV_PATH cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE, dest, buf, PATH_MAX); |