|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35071 Wrong fopen mode used in GD safe-mode checks
Submitted: 2005-11-02 21:04 UTC Modified: 2005-11-03 21:28 UTC
Avg. Score:4.6 ± 0.9
Reproduced:11 of 12 (91.7%)
Same Version:8 (72.7%)
Same OS:6 (54.5%)
From: webmaster at iksaif dot net Assigned:
Status: Closed Package: GD related
PHP Version: 4.4.1 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: webmaster at iksaif dot net
New email:
PHP Version: OS:


 [2005-11-02 21:04 UTC] webmaster at iksaif dot net
in ext/gd.c ext/gd_ctx.c  
(PG(safe_mode) && !php_checkuid(fn, "rb+",  
should be :  
(PG(safe_mode) && !php_checkuid(fn, "wb+",  
because with "rb+" it's impossible to create a new file  
with imagepng,imagejpeg, etc ....  
("r" change mode from CHECKUID_CHECK_FILE_AND_DIR to  


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-02 21:25 UTC] moron at industrial dot org
This is the same issue covered in bug #35060 (though you do suggest a potential fix). claims this is a documentation problem, not a bug.
 [2005-11-02 22:28 UTC]
Fixed in HEAD and PHP_5_1 branches.

 [2005-11-03 21:21 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 02:01:29 2024 UTC