change to ee.c

Bruce Cran bruce at cran.org.uk
Sun Nov 30 00:43:40 PST 2008


On Sat, 29 Nov 2008 23:21:48 -0500
Eitan Adler <eitanadlerlist at gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Xin LI wrote:
> > Hi, Eitan,
> 
> > Tanks for interested in this but I'm afraid that your patch is
> > incorrect.  mkstemp returns a file descriptor rather than a string
> > pointer, therefore, the subsequent open() would have undefined
> > behavior. It looks like that we actually want fd = mkstemp() here.
> Thanks.  If this is the case how come gcc did not return any warnings?
> > 
> > Note that we may want to bring vendor fixes before making any
> > changes to reduce duplicated work...
> I was not aware that this was a third party program. I'll look around
> and see if this was fixed.
> 

The version of ee in FreeBSD is fairly old: the latest from
http://mahon.cwx.net/ is 1.4.6.  Even so, the
latest version still generates lots of warnings from gcc because the
developer used NULL instead of '\0' (i.e the NULL constant instead of
the NUL string).  The patch at
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/127986 fixes them; I
emailed the developer but got no reply.

-- 
Bruce Cran


More information about the freebsd-hackers mailing list