libbsd 0.5.1 causing segfault in FreeIPA

Guillem Jover guillem at hadrons.org
Fri Jun 7 06:37:04 PDT 2013


Hi!

On Fri, 2013-06-07 at 07:38:44 +0200, Guillem Jover wrote:
> On Fri, 2013-06-07 at 07:37:00 +0200, Guillem Jover wrote:
> > ... but then I'm thinking it's not worth it, and the tiny memory leak
> > it introduces (which is inherent anyway in most libc implementations
> > when changing the environment) by not using clearenv() is better than
> > the complexity this adds to the constructor.
> > 
> > So, if no one has any compelling reason, I'll release 0.5.2 with
> > clearenv() completely removed later today.

Actually, I've been sleeping over this, and I think I'll go with the
environ shallow copy patch, because being extra paranoid it's safer to
not assume stuff like setenv() might not free the internally handled
environ array of pointers, if it detects it has changed. I'll also
use proper envsize instead of special casing the final NULL.

Thanks,
Guillem


More information about the libbsd mailing list