php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33336 Segmentation fault in get_headers() function
Submitted: 2005-06-14 12:31 UTC Modified: 2005-06-15 13:52 UTC
From: v0yager at chaik dot ru Assigned:
Status: Closed Package: HTTP related
PHP Version: 5.0.4 OS: Fedora core1
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: v0yager at chaik dot ru
New email:
PHP Version: OS:

 

 [2005-06-14 12:31 UTC] v0yager at chaik dot ru
Description:
------------
php -v:
PHP 5.0.4 (cli) (built: Jun 14 2005 15:46:20)
Copyright (c) 1997-2004 The PHP Group

php configured with options:

--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
--with-mysql-sock=/var/lib/mysql \
--enable-ftp \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-debug \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--enable-sockets


Reproduce code:
---------------
script.php contains:

<?php
$headers=get_headers("http://myhost.ru/1.php");
print_r($headers);
?>
=============
"1.php" contains:

<?php
header("Location: ftp://ftp.myhost.ru/video/movie.avi");
?>
=============

Expected result:
----------------
script.php terminated with Segmentation fault when server answer contains header "Location" to ftp resource. I think it is necessary to finish recursive calls of this function when  header contains Location "jump" to ftp resource.

PS: Sorry for my bad english %)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-14 15:30 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-06-15 13:52 UTC] v0yager at chaik dot ru
Thanks a lot!!! :)
Now it works
 [2013-09-09 09:37 UTC] daverandom@php.net
Automatic comment from SVN on behalf of daverandom
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=331317
Log: Add missing semi-colon in type comparison tables for consistency

---
Provided by PHDOE anonymous user #33336
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 16:01:27 2019 UTC