aboutsummaryrefslogtreecommitdiff
path: root/shells/ksh2020
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2020-12-02 18:43:35 +0000
committerCy Schubert <cy@FreeBSD.org>2020-12-02 18:43:35 +0000
commite49cde4c83ce1d4c3e66860b6acddd20ea48f9db (patch)
tree08f9c1f83bfbc9f05d779d886ace3d18fbe501c2 /shells/ksh2020
parentaddbef6baecd4d66eafd513200b8f6a31da00a43 (diff)
downloadports-e49cde4c83ce1d4c3e66860b6acddd20ea48f9db.tar.gz
ports-e49cde4c83ce1d4c3e66860b6acddd20ea48f9db.zip
Don't reassign the "len" variable and compute the exact spaces needed.
PR: 251275 Submitted by: Romeo Rajomalaza <endian.sign _ gmail.com> Reported by: Romeo Rajomalaza <endian.sign _ gmail.com> MFH: 2020Q4
Notes
Notes: svn path=/head/; revision=556844
Diffstat (limited to 'shells/ksh2020')
-rw-r--r--shells/ksh2020/Makefile1
-rw-r--r--shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/shells/ksh2020/Makefile b/shells/ksh2020/Makefile
index da526975bd01..5fac4f251053 100644
--- a/shells/ksh2020/Makefile
+++ b/shells/ksh2020/Makefile
@@ -2,6 +2,7 @@
PORTNAME= ksh2020
PORTVERSION= 2020
+PORTREVISION= 1
CATEGORIES= shells
MAINTAINER= cy@FreeBSD.org
diff --git a/shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c b/shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c
new file mode 100644
index 000000000000..bd34d2bb7e4d
--- /dev/null
+++ b/shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c
@@ -0,0 +1,12 @@
+--- src/cmd/ksh93/edit/pcomplete.c.orig 2020-11-20 14:41:10.427589000 +0000
++++ src/cmd/ksh93/edit/pcomplete.c 2020-11-20 14:47:28.958973000 +0000
+@@ -338,8 +338,7 @@
+ }
+ if (complete) {
+ // Reserved space on stack and try again.
+- len = 3;
+- tlen = (c + 1) * sizeof(char *) + len * c + 1024;
++ tlen += (c + 1) * sizeof(char *) + (plen + slen + 1) * c;
+ stkseek(shp->stk, tlen);
+ complete = 2;
+ av = (char **)stkptr(shp->stk, 0);