getpwuid checking

Andrew V. Samoilov andrew at email.zp.ua
Thu Sep 23 12:43:18 UTC 2004


Hello Leonard,
> 
> On Thu, 2004-09-23 at 12:48, Oskar Liljeblad wrote:
> > This patch fixes two potential segfault bugs because the result of
> > getpwuid is not checked.
> 
> A similar fix for the second hunk is already in CVS.
> 
> Regarding the first hunk, will g_strdup actually cause a segfault when
> the result of getpwuid() is NULL?

There is NULL derefference getpwuid(x)->pw_shell.
This patch is valuable.

-- 
Regards,
Andrew V. Samoilov.




More information about the mc-devel mailing list