php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4009 getpwnam crashes if parsing a passwd entry with null gecos
Submitted: 2000-04-03 06:45 UTC Modified: 2005-03-31 16:13 UTC
From: kiko at radiumsystems dot com dot br Assigned:
Status: Wont fix Package: Reproducible Crash
PHP Version: 3.0.15 OS: Linux-2.2.14
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2000-04-03 06:45 UTC] kiko at radiumsystems dot com dot br
A simple

<? var_dump(posix_getpwnam("user")) ?>

will core dump if user has a null gecos (possibly, any
null value). As in:

user:x:500:100::/home/user:/bin/bash


 The fix needs to take into account nulls comming in 
via getpwnam and appropriately blank the fields. I can't fix this right now,
but it should be an easy one.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 06:01:27 2019 UTC