|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24345 php get Seg. fault when use out of range array element.
Submitted: 2003-06-26 08:48 UTC Modified: 2003-06-26 12:04 UTC
From: legion at altlinux dot ru Assigned: iliaa (profile)
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.3.3RC1 OS: ALTLinux (2.4.21rc1)
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: legion at altlinux dot ru
New email:
PHP Version: OS:


 [2003-06-26 08:48 UTC] legion at altlinux dot ru
php get seg. fault if i try to use none exists array element. 
Php version: PHP 4.3.3RC2-dev (cvs snapshot 20030624)

Reproduce code:
$s = "a|b|c|d";
for ($i = 0; $i < 1000; $i++) {
   for ($j = 0; $j < 1000; $j++) {
    $a = split("\|", $s);
    $h[$i]['date'][$j]['count'] = $a[4];

Expected result:
Successfully finished.

Actual result:
Segmentation fault


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-26 09:02 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

This is fixed in PHP-5.0.0-dev and can not be backported to PHP 4.3.3-dev due to limitations in the engine.
 [2003-06-26 10:50 UTC]
There maybe a solution for this bug for 4.X, however it needs testing. Once it has been validated or rejected final decision about the status of this bug will be made.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Aug 13 11:05:44 2022 UTC