1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 05:00:59 +01:00

39958: Add extra byte to PATH_MAX allocations.

This ensures we've got enough space for a null, although this
isn't always needed.
This commit is contained in:
Peter Stephenson 2016-11-17 19:49:17 +00:00
parent 297471cf77
commit a62e1640bc
8 changed files with 28 additions and 22 deletions

View file

@ -2135,7 +2135,7 @@ gen_matches_files(int dirs, int execs, int all)
{
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;