Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Mar 2002 11:46:55 +0000
From:      Mark Murray <mark@grondar.za>
To:        Mike Barcroft <mike@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/rwall rwall.c 
Message-ID:  <200203071146.g27BktRV009651@grimreaper.grondar.org>
In-Reply-To: <20020307060920.C81803@espresso.q9media.com> ; from Mike Barcroft <mike@FreeBSD.org>  "Thu, 07 Mar 2002 06:09:20 EST."
References:  <20020307060920.C81803@espresso.q9media.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > -       if ((fd = mkstemp(tmpname)) == -1 || !(fp = fdopen(fd, "r+")))
> > +       fd = mkstemp(tmpname);
> > +       fp = fdopen(fd, "r+");
> > +       if (fd == -1 || !fp)
> > 
> > Why did you need to do such code restructuring?
> 
> This introduces a bug where fdopen() could attempt to open a bad file
> descriptor in the case of an error with mkstemp().

I'll fix that.

M
-- 
o       Mark Murray
\_
O.\_    Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203071146.g27BktRV009651>