Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 1 Jan 2003 19:01:12 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Cc: "Pierre A. Humblet" Subject: Re: Heads up: *possible* bug in cygwin Message-ID: <20030102000112.GB24893@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com, "Pierre A. Humblet" References: <20030101100510 DOT 5b5b7f3f DOT steven DOT obrien2 AT ntlworld DOT com> <20030101170613 DOT GA19419 AT redhat DOT com> <20030101171952 DOT GA83996745 AT HPN5170X> <20030101173445 DOT GA1354 AT redhat DOT com> <20030101194854 DOT GA19827 AT redhat DOT com> <20030101211342 DOT GA35586973 AT HPN5170X> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030101211342.GA35586973@HPN5170X> User-Agent: Mutt/1.5.1i On Wed, Jan 01, 2003 at 04:13:42PM -0500, Pierre A. Humblet wrote: >On Wed, Jan 01, 2003 at 02:48:54PM -0500, Christopher Faylor wrote: >>I've uploaded a new snapshot which should correctly calculate the >>buffer size for overflow conditions and returns a large number for >>_SC_GETPW_R_SIZE_MAX > >Chris, I don't understand your changes in getpwuid_r32. The uid and >gid are stored in struct passwd pwd fields and don't consume any space >in the buffer. The buffer is filled with the strcpy's toward the end. >I don't see problems there. Oops. You're right. So, the only potential problem is that the getpw routines aren't thread safe. There is a window during the passwd info resides in a static structure. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/