diff options
author | Cy Schubert <cy@FreeBSD.org> | 2020-12-02 18:43:35 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2020-12-02 18:43:35 +0000 |
commit | e49cde4c83ce1d4c3e66860b6acddd20ea48f9db (patch) | |
tree | 08f9c1f83bfbc9f05d779d886ace3d18fbe501c2 /shells/ksh2020 | |
parent | addbef6baecd4d66eafd513200b8f6a31da00a43 (diff) | |
download | ports-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/Makefile | 1 | ||||
-rw-r--r-- | shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c | 12 |
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); |