|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12194 Php_open_temporary_file.c doesn't handle trailing slash on path.
Submitted: 2001-07-16 18:44 UTC Modified: 2002-02-26 21:32 UTC
From: jonesd at er6s1 dot eng dot ohio-state dot edu Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.0.6 OS: all
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: jonesd at er6s1 dot eng dot ohio-state dot edu
New email:
PHP Version: OS:


 [2001-07-16 18:44 UTC] jonesd at er6s1 dot eng dot ohio-state dot edu
In file php_open_temporary_file.c, the code test for the existence of a trailing slash on the 'path' argument
using the statement:

   if (*path+strlen(path)-1 == '/') { ...

This test is incorrect, meaning a trailing slash on, upload_tmp_dir, for example, won't be handled as intended.
A correct way to do the test would be:

  if (path[strlen(path)-1] == '/') { ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-26 21:32 UTC]
The version of PHP that this bug was reported in is too old. Please
try to reproduce this bug in the latest version of PHP (available

If you are still able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 04:03:40 2021 UTC