From owner-cvs-src-old@FreeBSD.ORG Wed Oct 13 23:29:52 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A1B510656A9 for ; Wed, 13 Oct 2010 23:29:52 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7570F8FC1F for ; Wed, 13 Oct 2010 23:29:52 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o9DNTqTg045425 for ; Wed, 13 Oct 2010 23:29:52 GMT (envelope-from obrien@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o9DNTqHK045424 for cvs-src-old@freebsd.org; Wed, 13 Oct 2010 23:29:52 GMT (envelope-from obrien@repoman.freebsd.org) Message-Id: <201010132329.o9DNTqHK045424@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to obrien@repoman.freebsd.org using -f From: "David E. O'Brien" Date: Wed, 13 Oct 2010 23:29:09 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/bin/sh histedit.c memalloc.c memalloc.h src/tools/regression/bin/sh/expansion trim4.0 X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 23:29:56 -0000 obrien 2010-10-13 23:29:09 UTC FreeBSD src repository Modified files: bin/sh histedit.c memalloc.c memalloc.h Added files: tools/regression/bin/sh/expansion trim4.0 Log: SVN rev 213814 on 2010-10-13 23:29:09Z by obrien Do not assume in growstackstr() that a "precious" character will be immediately written into the stack after the call. Instead let the caller manage the "space left". Previously, growstackstr()'s assumption causes problems with STACKSTRNUL() where we want to be able to turn a stack into a C string, and later pretend the NUL is not there. This fixes a bug in STACKSTRNUL() (that grew the stack) where: 1. STADJUST() called after a STACKSTRNUL() results in an improper adjust. This can be seen in ${var%pattern} and ${var%%pattern} evaluation. 2. Memory leak in STPUTC() called after a STACKSTRNUL(). Reviewed by: jilles Revision Changes Path 1.39 +1 -1 src/bin/sh/histedit.c 1.32 +10 -7 src/bin/sh/memalloc.c 1.13 +8 -1 src/bin/sh/memalloc.h 1.1 +15 -0 src/tools/regression/bin/sh/expansion/trim4.0 (new)