Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()

From: Sean C. Farley <scf_at_FreeBSD.org>
Date: Wed, 4 Jul 2007 21:53:15 -0500 (CDT)
On Thu, 5 Jul 2007, Andrey Chernov wrote:

> On Wed, Jul 04, 2007 at 11:59:39PM +0400, Andrey Chernov wrote:
>>> Sean
>>>   1. http://www.farley.org/freebsd/tmp/setenv/clearenv/
>
> BTW, I think this one should _not_ free() anything according to your
> comment:
>
>  No
> * previous variables are ever freed here to avoid causing a segmentation fault
> * in a user's code.

The latest patch at the same URL fixes that issue.  It basically
deactivates all existing variables and inserts the new environ variables
into the envVars array.

Sean
-- 
scf_at_FreeBSD.org
Received on Thu Jul 05 2007 - 00:53:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC