diff --color -Naur zsh-4.3.6.ori/Src/builtin.c zsh-4.3.6.new/Src/builtin.c
--- zsh-4.3.6.ori/Src/builtin.c	2008-03-27 12:47:11.000000000 +0100
+++ zsh-4.3.6.new/Src/builtin.c	2022-03-04 15:57:56.363486203 +0100
@@ -922,7 +922,7 @@
      * 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];
 #ifndef _SYS_CYGWIN_H
     void cygwin_conv_to_posix_path(const char *, char *);
 #endif
diff --color -Naur zsh-4.3.6.ori/Src/compat.c zsh-4.3.6.new/Src/compat.c
--- zsh-4.3.6.ori/Src/compat.c	2008-03-03 13:23:07.000000000 +0100
+++ zsh-4.3.6.new/Src/compat.c	2022-03-04 15:59:06.644050384 +0100
@@ -245,7 +245,7 @@
     int len;
 #endif
 
-    buf = zhalloc(bufsiz = PATH_MAX);
+    buf = zhalloc(bufsiz = PATH_MAX+1);
     pos = bufsiz - 1;
     buf[pos] = '\0';
     strcpy(nbuf, "../");
diff --color -Naur zsh-4.3.6.ori/Src/exec.c zsh-4.3.6.new/Src/exec.c
--- zsh-4.3.6.ori/Src/exec.c	2022-03-04 15:39:00.634366320 +0100
+++ zsh-4.3.6.new/Src/exec.c	2022-03-04 16:04:02.734427132 +0100
@@ -520,7 +520,7 @@
 execute(LinkList args, int flags, int defpath)
 {
     Cmdnam cn;
-    char buf[MAXCMDLEN], buf2[MAXCMDLEN];
+    char buf[MAXCMDLEN+1], buf2[MAXCMDLEN+1];
     char *s, *z, *arg0;
     char **argv, **pp, **newenvp = NULL;
     int eno = 0, ee;
@@ -595,7 +595,7 @@
 
     /* for command -p, search the default path */
     if (defpath) {
-	char *s, pbuf[PATH_MAX];
+	char *s, pbuf[PATH_MAX+1];
 	char *dptr, *pe, *ps = DEFAULT_PATH;
 
 	for(;ps;ps = pe ? pe+1 : NULL) {
@@ -632,7 +632,7 @@
     } else {
 
 	if ((cn = (Cmdnam) cmdnamtab->getnode(cmdnamtab, arg0))) {
-	    char nn[PATH_MAX], *dptr;
+	    char nn[PATH_MAX+1], *dptr;
 
 	    if (cn->node.flags & HASHED)
 		strcpy(nn, cn->u.cmd);
@@ -717,7 +717,7 @@
 	    break;
 	}
     if (cn) {
-	char nn[PATH_MAX];
+	char nn[PATH_MAX+1];
 
 	if (cn->node.flags & HASHED)
 	    strcpy(nn, cn->u.cmd);
@@ -798,7 +798,7 @@
 hashcmd(char *arg0, char **pp)
 {
     Cmdnam cn;
-    char *s, buf[PATH_MAX];
+    char *s, buf[PATH_MAX+1];
     char **pq;
 
     for (; *pp; pp++)
@@ -4236,7 +4236,7 @@
 Eprog
 getfpfunc(char *s, int *ksh)
 {
-    char **pp, buf[PATH_MAX];
+    char **pp, buf[PATH_MAX+1];
     off_t len;
     off_t rlen;
     char *d;
@@ -4357,7 +4357,7 @@
     char *t;
 
     if (*s != '/') {
-	char sbuf[PATH_MAX], **cp;
+	char sbuf[PATH_MAX+1], **cp;
 
 	if (cancd2(s))
 	    return s;
diff --color -Naur zsh-4.3.6.ori/Src/glob.c zsh-4.3.6.new/Src/glob.c
--- zsh-4.3.6.ori/Src/glob.c	2007-11-05 15:45:07.000000000 +0100
+++ zsh-4.3.6.new/Src/glob.c	2022-03-04 16:04:02.734427132 +0100
@@ -247,7 +247,7 @@
 static int
 statfullpath(const char *s, struct stat *st, int l)
 {
-    char buf[PATH_MAX];
+    char buf[PATH_MAX+1];
 
     DPUTS(strlen(s) + !*s + pathpos - pathbufcwd >= PATH_MAX,
 	  "BUG: statfullpath(): pathname too long");
@@ -753,7 +753,7 @@
 
     /* Now there is no (#X) in front, we can check the path. */
     if (!pathbuf)
-	pathbuf = zalloc(pathbufsz = PATH_MAX);
+	pathbuf = zalloc(pathbufsz = PATH_MAX+1);
     DPUTS(pathbufcwd, "BUG: glob changed directory");
     if (*str == '/') {		/* pattern has absolute path */
 	str++;
diff --color -Naur zsh-4.3.6.ori/Src/utils.c zsh-4.3.6.new/Src/utils.c
--- zsh-4.3.6.ori/Src/utils.c	2022-03-04 15:53:31.317358623 +0100
+++ zsh-4.3.6.new/Src/utils.c	2022-03-04 16:07:55.372292893 +0100
@@ -622,7 +622,7 @@
     return 0;
 }
 
-static char xbuf[PATH_MAX*2];
+static char xbuf[PATH_MAX*2+1];
 
 /**/
 static char **
@@ -662,7 +662,7 @@
 xsymlinks(char *s)
 {
     char **pp, **opp;
-    char xbuf2[PATH_MAX*2], xbuf3[PATH_MAX*2];
+    char xbuf2[PATH_MAX*2+1], xbuf3[PATH_MAX*2+1];
     int t0, ret = 0;
     zulong xbuflen = strlen(xbuf);
 
@@ -827,7 +827,7 @@
 	if(homenode.diff==1)
 	    homenode.diff = 0;
 	if(!finddir_full)
-	    finddir_full = zalloc(ffsz = PATH_MAX);
+	    finddir_full = zalloc(ffsz = PATH_MAX+1);
 	finddir_full[0] = 0;
 	return finddir_last = NULL;
     }
@@ -1272,7 +1272,7 @@
 	} else if (S_ISDIR(st.st_mode)) {
 	    LinkList l;
 	    DIR *lock = opendir(unmeta(*s));
-	    char buf[PATH_MAX * 2], **arr, **ap;
+	    char buf[PATH_MAX * 2 + 1], **arr, **ap;
 	    int buflen, ct = 1;
 
 	    if (lock) {
@@ -5197,7 +5197,7 @@
 static int
 upchdir(int n)
 {
-    char buf[PATH_MAX];
+    char buf[PATH_MAX+1];
     char *s;
     int err = -1;
 
diff --color -Naur zsh-4.3.6.ori/Src/Zle/compctl.c zsh-4.3.6.new/Src/Zle/compctl.c
--- zsh-4.3.6.ori/Src/Zle/compctl.c	2022-03-04 14:10:11.191477169 +0100
+++ zsh-4.3.6.new/Src/Zle/compctl.c	2022-03-04 15:56:29.578789547 +0100
@@ -2131,7 +2131,7 @@
 {
     DIR *d;
     struct stat buf;
-    char *n, p[PATH_MAX], *q = NULL, *e, *pathpref;
+    char *n, p[PATH_MAX+1], *q = NULL, *e, *pathpref;
     LinkList l = NULL;
     int ns = 0, ng = opts[NULLGLOB], test, aw = addwhat, pathpreflen;
 
