#40098 [Csd]: php_fopen_primary_script() not thread safe
| From: | tony2001@php.net | Date: | Fri, 12 Jan 2007 14:35:36 +0000 |
| Subject: | #40098 [Csd]: php_fopen_primary_script() not thread safe | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107537@lists.php.net to get a copy of this message | ||
ID: 40098
Updated by: tony2001@php.net
Reported By: wharmby at uk dot ibm dot com
Status: Closed
Bug Type: Streams related
Operating System: Linux RHEL4
PHP Version: 5CVS-2007-01-11 (snap)
Assigned To: iliaa
New Comment:
The typo was fixed earlier, the missing var declaration is now fixed
too.
Previous Comments:
------------------------------------------------------------------------
[2007-01-12 14:35:31] bjori@php.net
Fixed in CVS, thanks :)
------------------------------------------------------------------------
[2007-01-12 14:26:44] wharmby at uk dot ibm dot com
Sorry but having now picked up latest snapshot (Jan 12 2007, 1330 GMT)
and tried to rebuild on Linux it I get 2 compile errors in
fopen_wrappers.c and safe_mode.c after changes dropped under this
defect.
Required patch for fopen_warppers.c is
http://www.pastebin.ca/314159
and for safe_mode.c
http://www.pastebin.ca/314162
Regards
Andy
------------------------------------------------------------------------
[2007-01-12 09:10:45] tony2001@php.net
Fixed in CVS, thanks.
------------------------------------------------------------------------
[2007-01-12 08:57:36] wharmby at uk dot ibm dot com
Hi Ilia
Thanks for applying the fix for this defect.
However, in adjusting the fix to deal with the SYSCONF
errors I believe you have introduced a storage leak.
The code as it stands does not free "pwbuf" if the call to getpwnam_r
is successful after it has finished extracting the data from it.
Here is a patch for the missing code built against latest
snapshot for 5.2:
http://www.pastebin.ca/313940
Regards
Andy
------------------------------------------------------------------------
[2007-01-12 01:46:21] iliaa@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/40098
--
Edit this bug report at http://bugs.php.net/?id=40098&edit=1