php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3473 Memory leaks when using regex in a 2d array.
Submitted: 2000-02-13 13:06 UTC Modified: 2000-08-20 01:50 UTC
From: caps at bmw dot org Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 3 OS: Linux 2.2.15 (RH 5.2)
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: caps at bmw dot org
New email:
PHP Version: OS:

 

 [2000-02-13 13:06 UTC] caps at bmw dot org
When using the next script PHP leaks memory,

for ($i=0;$i<count($Users);$i++) {

$Branche = "";

for ($B=2;$B<count($Users[$i]);$B++)

$Branche.=$Users[$i][$B];

$Users[$i][1] = str_replace(",",".",$Users[$i][1]);

$Users[$i][1] = ereg_replace("[ !#\$%\^&\*\(\)]","", $Users[$i][1]);

$Login=substr(ereg_replace("[,\. !#\$%\^&\*\(\)]","", $Users[$i][0]),0,7);

$Query=sprintf("INSERT INTO EmailService

VALUES ('%s', '%s', PASSWORD('%s'), 0, NULL, '%s', '111111111111', '%s')",

$Users[$i][0], $Users[$i][1], $Users[$i][1], $Branche, strtolower($Login));

$id=mysql_query("$Query");

print "Done!";



This results in :

Done!

reg.c(487) :  Freeing 0x08106E90 (1 bytes), script=Convert.php3

string.c(1549) :  Freeing 0x08105BC8 (1 bytes), script=Convert.php3



Logan5 told me to post this, so here you are:-)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-01 23:26 UTC] waldschrott@php.net
Please verify that it?s still happening using the latest version of PHP (release 4.0.1pl2 or CVS).
 [2000-08-20 01:50 UTC] sniper@php.net
No feedback from user.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 16:01:29 2024 UTC