php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68670 Incorrect file handling
Submitted: 2014-12-28 22:37 UTC Modified: 2015-10-12 13:05 UTC
From: bugreports at internot dot info Assigned: tyrael (profile)
Status: Closed Package: phpdbg
PHP Version: 5.6.10RC1 OS: *
Private report: No CVE-ID: None
 [2014-12-28 22:37 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /sapi/phpdbg/phpdbg_prompt.c:

877        if ((fd=VCWD_POPEN((char*)param->str, "w"))) {
uses popen(), but it is freed using fclose():
 879                fclose(fd);

It should be using pclose(fd).

Thanks


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-30 02:48 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Package: *General Issues +Package: phpdbg -Assigned To: +Assigned To: krakjoe
 [2014-12-30 02:48 UTC] aharvey@php.net
Joe (or Bob), any thoughts?
 [2015-06-05 13:54 UTC] cmb@php.net
-Operating System: Linux Ubuntu 14.04 +Operating System: * -PHP Version: master-Git-2014-12-28 (Git) +PHP Version: 5.6.10RC1 -Assigned To: krakjoe +Assigned To: tyrael
 [2015-06-05 13:54 UTC] cmb@php.net
This issue has already been fixed in master[1], but the fix has
not been released yet[2]. Ferenc, can you please have a look at
it.

[1] <https://github.com/php/php-src/commit/305c03e75782fe39aaa71fc8a8983a8110b13beb>
[2] <https://github.com/php/php-src/blob/php-5.6.10RC1/sapi/phpdbg/phpdbg_prompt.c#L839-L841>
 [2015-10-12 13:05 UTC] felipe@php.net
-Status: Assigned +Status: Closed
 [2015-10-12 13:05 UTC] felipe@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 09:01:30 2024 UTC