svn commit: r556844 - in head/shells/ksh2020: . files

Cy Schubert cy at FreeBSD.org
Wed Dec 2 18:43:36 UTC 2020


Author: cy
Date: Wed Dec  2 18:43:35 2020
New Revision: 556844
URL: https://svnweb.freebsd.org/changeset/ports/556844

Log:
  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

Added:
  head/shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c   (contents, props changed)
Modified:
  head/shells/ksh2020/Makefile   (contents, props changed)

Modified: head/shells/ksh2020/Makefile
==============================================================================
--- head/shells/ksh2020/Makefile	Wed Dec  2 18:24:36 2020	(r556843)
+++ head/shells/ksh2020/Makefile	Wed Dec  2 18:43:35 2020	(r556844)
@@ -2,6 +2,7 @@
 
 PORTNAME=	ksh2020
 PORTVERSION=	2020
+PORTREVISION=	1
 CATEGORIES=	shells
 
 MAINTAINER=	cy at FreeBSD.org

Added: head/shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/shells/ksh2020/files/patch-src_cmd_ksh93_edit_pcomplete.c	Wed Dec  2 18:43:35 2020	(r556844)
@@ -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);


More information about the svn-ports-head mailing list