bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] setenv update


From: Paul Eggert
Subject: Re: [Bug-gnulib] setenv update
Date: 21 Jan 2004 11:47:15 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Bruno Haible <address@hidden> writes:

> I'm not the glibc maintainer. It should be Ulrich who
> decides about such issues inside _LIBC code.

But our copy of setenv.c has already forked from glibc.  It should
contain the code we'd like to merge into glibc.

It sounds like the problem is that glibc doesn't have allocsa, and
you're understandably reluctant to propose adding it right now.  If
so, I suggest we add something like this near the start of setenv.c:

#ifdef _LIBC
/* FIXME: glibc should check for alloca overflow, as this can lead
   to buffer overrun.  */
# define allocsa alloca
#endif

and then using allocsa uniformly in the code proper.

Or, if you want absolutely no changes inside the glibc code, we can
even reverse it, as follows:

#ifndef _LIBC
# define alloca allocsa
#else
/* FIXME: glibc should also check for alloca overflow, as this can lead
   to buffer overrun.  */
#endif

I prefer the first solution, as I don't like to redefine standard
functions, but either solution removes unnecessary duplication of code
in setenv.c.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]