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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 05:01:30 2024 UTC