From a62e1640bcafbb82d86ea8d8ce057a83c4683d60 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 17 Nov 2016 19:49:17 +0000 Subject: 39958: Add extra byte to PATH_MAX allocations. This ensures we've got enough space for a null, although this isn't always needed. --- Src/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/builtin.c') 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); -- cgit 1.4.1