Date: Fri, 30 May 2003 23:27:58 -0700 (PDT) From: Bill Fenner <fenner@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/sh expand.c Message-ID: <200305310627.h4V6Rwb2039438@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
fenner 2003/05/30 23:27:58 PDT FreeBSD src repository Modified files: bin/sh expand.c Log: Instead of eating trailing newlines after inserting them into the output buffer, don't insert them at all. This prevents a buffer *underrun* when the substitution consists completely of newlines (e.g. `echo`) and the byte before the source buffer to which p points is a '\n', in which case more characters would be removed from the output buffer than were inserted. This fixes certain port builds on sparc64. Approved by: re (scottl) Reviewed by: des, tjr Revision Changes Path 1.43 +12 -5 src/bin/sh/expand.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305310627.h4V6Rwb2039438>