From e4f94a59770a3415ec4d22dc08d359c76e0072ce Mon Sep 17 00:00:00 2001 From: Christian Weisgerber Date: Tue, 20 Aug 2002 14:36:32 +0000 Subject: Fix core dump in glob expansion. PR: 41778 Submitted by: Joe Kelsey Obtained from: David Korn --- shells/ksh93/Makefile | 2 +- shells/ksh93/files/patch-src_cmd_ksh93_sh_path.c | 35 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 shells/ksh93/files/patch-src_cmd_ksh93_sh_path.c (limited to 'shells/ksh93') 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); + } + -- cgit v1.2.3