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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 12:01:27 2024 UTC