php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14327 basename crashes on empty string
Submitted: 2001-12-03 13:40 UTC Modified: 2001-12-03 14:06 UTC
From: theseer@php.net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0CVS-2001-12-03 OS: Linux 2.4.16 ( RH 7.2 based)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: theseer@php.net
New email:
PHP Version: OS:

 

 [2001-12-03 13:40 UTC] theseer@php.net
<?php
  $foo=basename($test);
  echo "alive?";
  ?>

A segfault occures while calling basename() on an empty string - at least it does on my cvs-version from Dec 30 2001

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-03 14:06 UTC] derick@php.net
From the logfile:

revision 1.254
date: 2001/12/01 15:45:55;  author: derick;  state: Exp;  lines: +6 -15
- Fix a crash when passing e.g. NULL to basename(). (Patch by Markus
  Fischer <mfischer@guru.josefine.at>)
#- Simplyfied code using zend_parse_parameters().

It's already fixed.

regards,
Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 09:01:27 2024 UTC