Date: Wed, 4 Jul 2007 18:36:42 +0400 From: Andrey Chernov <ache@nagual.pp.ru> To: Michal Mertl <mime@traveller.cz> Cc: freebsd-current <freebsd-current@freebsd.org>, scf@freebsd.org Subject: Re: Environment handling broken in /bin/sh with changes to {get,set,put}env() Message-ID: <20070704143642.GA31254@nagual.pp.ru> In-Reply-To: <1183557221.1799.16.camel@genius.i.cz> References: <1183557221.1799.16.camel@genius.i.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 04, 2007 at 03:53:41PM +0200, Michal Mertl wrote: > I have tracked it down to the changes in {get,set,put}env and > src/bin/sh/var.c 1.36. I have checked (by inserting printf just before > the call) that the arguments passed to putenv() in var.c are reasonable, > yet the above mentioned warning is issued. 1) I don't check it yet, but there is no putenv() calls in var.c 1.36 in anycase. 2) "s" may point to getenv()-provided value there. So just modifying it directly followed by setenv() call will make things inconsistent. 3) In my version of patch there was savestr() which copy arg to avoid this situation. Fix will be to restore var.c to mine variant 1.34 -- http://ache.pp.ru/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070704143642.GA31254>