On Wed, 28 Mar 2012 21:40:37 +1000 David Seikel <[email protected]> said:

> On Wed, 28 Mar 2012 13:29:40 +0200 Leif Middelschulte
> <[email protected]> wrote:
> 
> > 2012/3/28 Enlightenment SVN <[email protected]>:
> > > Log:
> > > put env bug so waiting to happen - env vars wont be set. no crash
> > >  though.
> > >
> > >
> > >
> > > Author:       raster
> > > Date:         2012-03-28 00:26:22 -0700 (Wed, 28 Mar 2012)
> > > New Revision: 69696
> > > Trac:         http://trac.enlightenment.org/e/changeset/69696
> > >
> > > Modified:
> > >  trunk/e/src/bin/e_start_main.c
> > >
> > > Modified: trunk/e/src/bin/e_start_main.c
> > > ===================================================================
> > > --- trunk/e/src/bin/e_start_main.c      2012-03-28 07:17:46 UTC
> > > (rev 69695) +++ trunk/e/src/bin/e_start_main.c      2012-03-28
> > > 07:26:22 UTC (rev 69696) @@ -27,9 +27,10 @@
> > >        setenv(var, val, 1);
> > >  #else
> > >        char *buf;
> > > +        size_t size = strlen(var) + 1 + strlen(val) + 1;
> > >
> > > -       buf = alloca(strlen(var) + 1 + strlen(val) + 1);
> > > -       snprintf(buf, sizeof(buf), "%s=%s", var, val);
> > > +       buf = alloca(size;
> > missing right paranthesis here?
> 
> How did that even compile?

the whole section is ifdefed out - i think for bsd or something obscure that
doesnt have setenv(). the code was already broken - it would have totally
failed to set any env var at all, so it improved. at least you'd know its
broken at compile time.

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to