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/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'Src/hist.c')
diff --git a/Src/hist.c b/Src/hist.c
index eebd7dcde..5be7d2524 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1843,7 +1843,7 @@ chrealpath(char **junkptr)
# ifdef REALPATH_ACCEPTS_NULL
char *lastpos, *nonreal, *real;
# else
- char *lastpos, *nonreal, pathbuf[PATH_MAX];
+ char *lastpos, *nonreal, pathbuf[PATH_MAX+1];
char *real = pathbuf;
# endif
#endif
--
cgit v1.2.3