Date: Thu, 7 Dec 2000 19:19:13 -0600 (CST) From: Loren James Rittle <rittle@latour.rsch.comm.mot.com> To: es@hawkwind.utcs.toronto.edu Cc: ports@FreeBSD.org Subject: Small memory handling error in es-0.9-beta1.tar.gz Message-ID: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com>
next in thread | raw e-mail | index | archive | help
I have no idea if anyone besides me still runs es (or anyone cares to maintain their copies), but here is a patch to the last public release (that I know of). It bites you when you configure --with-readline and then proceed to enter a really long command line under the built shell. To ensure that you don't accidentally reverse patch it to a source tree where it was already done: It is strictly not legal to call the sequence: ``efree(X); X = erealloc(X, Y);''. I always love it when you can fix a bug by removing code. ;-) [Note to BSD ports maintainer: The port lives in /usr/ports/shells/es and this patch has been tested as /usr/ports/shells/es/files/patch-ab . Also (responding to the comment in revision 1.9 of the port's Makefile), as a non-committer and only if it helps, I would be happy to be listed in the Makefile as MAINTAINER= ljrittle@acm.org .] *** input.c.orig Tue Aug 12 18:59:26 1997 --- input.c Thu Dec 7 18:35:01 2000 *************** *** 307,313 **** if (in->buflen < nread) { while (in->buflen < nread) in->buflen *= 2; - efree(in->bufbegin); in->bufbegin = erealloc(in->bufbegin, in->buflen); } memcpy(in->bufbegin, rlinebuf, nread - 1); --- 307,312 ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012080119.eB81JDe98193>