aboutsummaryrefslogtreecommitdiffstats
path: root/shells/ksh93/files
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2002-08-20 22:36:32 +0800
committernaddy <naddy@FreeBSD.org>2002-08-20 22:36:32 +0800
commitdaeb0256410bd384620fff65b4fbe347d385daca (patch)
treec3324ccc572a553289a327008a6ef9b16e1cb731 /shells/ksh93/files
parentd277cb9b109b54f5188a94f924ed282e4d58a1f1 (diff)
downloadfreebsd-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/ksh93/files')
-rw-r--r--shells/ksh93/files/patch-src_cmd_ksh93_sh_path.c35
1 files changed, 35 insertions, 0 deletions
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);
+ }
+