php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21635 pg_escape_* want to allocate an insane amount of memory
Submitted: 2003-01-14 09:49 UTC Modified: 2003-03-10 20:40 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: r dot s dot a dot vandomburg at student dot utwente dot nl Assigned:
Status: No Feedback Package: PostgreSQL related
PHP Version: 4.3.1 OS: FreeBSD/sparc64 5.0-CURRENT
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: r dot s dot a dot vandomburg at student dot utwente dot nl
New email:
PHP Version: OS:

 

 [2003-01-14 09:49 UTC] r dot s dot a dot vandomburg at student dot utwente dot nl
Subject says it all. Working with PostgreSQL 7.3.1. Simple script to reproduce this behavior:

<?php
$str = pg_escape_string("toet");
echo $str;
?>
FATAL:  emalloc():  Unable to allocate 36514201601 bytes

Webpages containing such code take a long time to be generated on the server but leave no error message in the Apache log.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-14 10:01 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 [2003-02-08 07:12 UTC] r dot s dot a dot vandomburg at student dot utwente dot nl
After having upgraded to 4.3.0, the problem persisted. In the meanwhile, I have also upgraded to PostgreSQL 7.3.2 but to no avail.
 [2003-02-25 08:20 UTC] yohgaki@php.net
pg_escape_string() is _very_ simple libpq wrapper function.
Problem should be elsewhere in PHP (or other modules you load)

Just try to build php with simplest configuration (and do not load any module other than pgsql) see if it fixes and try to locate where is the real problem.
 [2003-02-25 09:01 UTC] r dot s dot a dot vandomburg at student dot utwente dot nl
That already is the case... I compiled it with nothing but PostgreSQL support. Not even zlib is in there.
 [2003-03-05 15:31 UTC] iliaa@php.net
Please try using this CVS snapshot:

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

I am unabled to reploduce the described problem using latest CVS.
If the problem persists please include the configure line you are using (from config.nice).
 [2003-03-10 20:40 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:31 2024 UTC