mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Use PATH_MAX instead of a local define
okk deraadt@ millert@ anton@
This commit is contained in:
parent
4234f61e93
commit
2b1380e7d9
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: c_ksh.c,v 1.50 2016/03/21 13:35:00 tb Exp $ */
|
||||
/* $OpenBSD: c_ksh.c,v 1.51 2017/09/03 11:52:01 jca Exp $ */
|
||||
|
||||
/*
|
||||
* built-in Korn commands: c_*
|
||||
@ -99,7 +99,7 @@ c_cd(char **wp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
Xinit(xs, xp, PATH, ATEMP);
|
||||
Xinit(xs, xp, PATH_MAX, ATEMP);
|
||||
/* xp will have a bogus value after make_path() - set it to 0
|
||||
* so that if it's used, it will cause a dump
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: path.c,v 1.18 2015/12/14 13:59:42 tb Exp $ */
|
||||
/* $OpenBSD: path.c,v 1.19 2017/09/03 11:52:01 jca Exp $ */
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
@ -220,7 +220,7 @@ do_phys_path(XString *xsp, char *xp, const char *path)
|
||||
const char *p, *q;
|
||||
int len, llen;
|
||||
int savepos;
|
||||
char lbuf[PATH];
|
||||
char lbuf[PATH_MAX];
|
||||
|
||||
Xcheck(*xsp, xp);
|
||||
for (p = path; p; p = q) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sh.h,v 1.63 2017/08/30 17:08:45 jca Exp $ */
|
||||
/* $OpenBSD: sh.h,v 1.64 2017/09/03 11:52:01 jca Exp $ */
|
||||
|
||||
/*
|
||||
* Public Domain Bourne/Korn shell
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
/* Start of common headers */
|
||||
|
||||
#include <limits.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
@ -33,7 +34,6 @@
|
||||
#define ISMAGIC(c) ((unsigned char)(c) == MAGIC)
|
||||
|
||||
#define LINE 4096 /* input line size */
|
||||
#define PATH 1024 /* pathname size (todo: PATH_MAX/pathconf()) */
|
||||
|
||||
extern const char *kshname; /* $0 */
|
||||
extern pid_t kshpid; /* $$, shell pid */
|
||||
|
Loading…
Reference in New Issue
Block a user