|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9249 tempnam() may return bad filename
Submitted: 2001-02-13 19:33 UTC Modified: 2001-04-27 21:46 UTC
From: seeliger dot curt at epa dot gov Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: linux
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: seeliger dot curt at epa dot gov
New email:
PHP Version: OS:


 [2001-02-13 19:33 UTC] seeliger dot curt at epa dot gov
$tname=tempnam($dir, $prefix);

prints '/foo/bar//prefiR5uKI4'

It'd be nice if the first argument was checked for a final '/' before creating the file name.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-27 21:46 UTC]
The sample code you provide works perfectly for me.  Try with the latest cvs snapshot ( and see if that fixes it on your end.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 08 00:05:48 2023 UTC