Heads up: *possible* bug in cygwin

Christopher Faylor cgf@redhat.com
Thu Jan 2 00:01:00 GMT 2003


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/



More information about the Cygwin mailing list