php.net |  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
 [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] == '/') { ...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-26 21:32 UTC] yohgaki@php.net
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
from http://www.php.net/downloads.php

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC