fix getpwuid_r() and getpwnam_r()

Pierre A. Humblet pierre@phumblet.no-ip.org
Mon Sep 8 21:59:00 GMT 2003


Radu Greab wrote:
> 
> I have not rebuilt cygwin to test this patch, but I think that the
> problem and the fix are obvious: pw_comment is not returned or
> initialized by these reentrant functions. The problem was discovered
> when debugging a perl test failure on cygwin:
> 
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-09/msg00500.html
> 
> Thanks,
> Radu Greab

It's true that member "comment" should be initialized.
However it is always NULL in Cygwin, so your code is likely to crash. 
Just set comment to NULL.

Pierre



More information about the Cygwin-patches mailing list