php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1593 mktemp crash
Submitted: 1999-06-24 06:45 UTC Modified: 1999-06-24 08:11 UTC
From: lemming at k332 dot feld dot cvut dot cz Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.9 OS: Linux 2.0.34
Private report: No CVE-ID: None
 [1999-06-24 06:45 UTC] lemming at k332 dot feld dot cvut dot cz
mktemp() function doesn't test, whether system mktemp returned NULL.
This can happen when mktemp cannot create temporary file.

How to invoke:

As root:
mkdir /tmp/aa
chmod og-rx /tmp/aa
chown user.group /tmp/aa

As user.group run:
<?
  echo mktemp("/tmp/aa","XXX");
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-24 08:11 UTC] sas at cvs dot php dot net
The tempnam() (we don't have a mktemp function) checks multiple times what mktemp() returns. Your example works here. If it crashes for you, please provide a backtrace.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 03:01:33 2024 UTC