#40098 [Csd]: php_fopen_primary_script() not thread safe
ID: 40098
User updated by: wharmby at uk dot ibm dot com
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:
Correction: safe_mode.c already fixed in 1330 GMT snap; just the error
in fopen_warppers remains.
Previous Comments:
------------------------------------------------------------------------
[2007-01-12 14:35:36] tony2001@php.net
The typo was fixed earlier, the missing var declaration is now fixed
too.
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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
Thread (9 messages)