diff options
author | naddy <naddy@FreeBSD.org> | 2002-08-20 22:36:32 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2002-08-20 22:36:32 +0800 |
commit | daeb0256410bd384620fff65b4fbe347d385daca (patch) | |
tree | c3324ccc572a553289a327008a6ef9b16e1cb731 /shells | |
parent | d277cb9b109b54f5188a94f924ed282e4d58a1f1 (diff) | |
download | freebsd-ports-gnome-daeb0256410bd384620fff65b4fbe347d385daca.tar.gz freebsd-ports-gnome-daeb0256410bd384620fff65b4fbe347d385daca.tar.zst freebsd-ports-gnome-daeb0256410bd384620fff65b4fbe347d385daca.zip |
Fix core dump in glob expansion.
PR: 41778
Submitted by: Joe Kelsey <joek@mail.flyingcroc.net>
Obtained from: David Korn <dgk@research.att.com>
Diffstat (limited to 'shells')
-rw-r--r-- | shells/ksh93/Makefile | 2 | ||||
-rw-r--r-- | shells/ksh93/files/patch-src_cmd_ksh93_sh_path.c | 35 |
2 files changed, 36 insertions, 1 deletions
diff --git a/shells/ksh93/Makefile b/shells/ksh93/Makefile index a2480792698f..2f32d4781953 100644 --- a/shells/ksh93/Makefile +++ b/shells/ksh93/Makefile @@ -6,7 +6,7 @@ PORTNAME= ksh93 PORTVERSION= ${VERSION:S/-//g} -PORTREVISION= 1 +PORTREVISION= 2 VERSION= 2002-06-28 CATEGORIES= shells MASTER_SITES= http://www.research.att.com/~gsf/download/tgz/ diff --git a/shells/ksh93/files/patch-src_cmd_ksh93_sh_path.c b/shells/ksh93/files/patch-src_cmd_ksh93_sh_path.c new file mode 100644 index 000000000000..2d035e09fee4 --- /dev/null +++ b/shells/ksh93/files/patch-src_cmd_ksh93_sh_path.c @@ -0,0 +1,35 @@ + +$FreeBSD$ + +--- src/cmd/ksh93/sh/path.c.orig Mon Mar 11 19:50:16 2002 ++++ src/cmd/ksh93/sh/path.c Tue Aug 20 12:51:15 2002 +@@ -1081,6 +1081,9 @@ + { + register const char *cp; + Pathcomp_t *old=0; ++ int offset = staktell(); ++ char *savptr; ++ + if(!path && type!=PATH_PATH) + return(first); + if(type!=PATH_FPATH) +@@ -1088,6 +1091,8 @@ + old = first; + first = 0; + } ++ if(offset) ++ savptr = stakfreeze(0); + if(path) while(*(cp=path)) + { + if(*cp==':') +@@ -1117,6 +1122,10 @@ + first = (void*)path_addpath((Pathcomp_t*)first,cp,PATH_FPATH); + path_delete(old); + } ++ if(offset) ++ stakset(savptr,offset); ++ else ++ stakseek(0); + return(first); + } + |