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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
19 + 23 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 01 10:05:53 2022 UTC