#24772 [NEW]: Applying isset() to a dereferenced string causes leak
| From: | moriyoshi@php.net | Date: | Wed, 23 Jul 2003 18:28:43 +0000 |
| Subject: | #24772 [NEW]: Applying isset() to a dereferenced string causes leak | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-44594@lists.php.net to get a copy of this message | ||
From: moriyoshi@php.net
Operating system: irrelevant
PHP version: 4CVS-2003-07-23 (stable)
PHP Bug Type: Scripting Engine problem
Bug description: Applying isset() to a dereferenced string causes leak
Description:
------------
Applying isset() to a dereference element of the string causes a very
small leak.
Reproduce code:
---------------
<?php
$a = "string";
var_dump(isset($a{0}));
?>
Expected result:
----------------
bool(true)
Actual result:
--------------
/home/koizumi/src/php-src-4/Zend/zend_execute.c(2399) : Freeing 0x0837545C
(2 bytes), script=/tmp/test.php
2397: zval *str = T->EA.data.str_offset.str;
2398: char c = str->value.str.val[T->EA.data.str_offset.offset];
2399: T->tmp_var.value.str.val = estrndup(&c, 1);
2400: T->tmp_var.value.str.len = 1;
2401: isset = 1;
2402: }
--
Edit bug report at http://bugs.php.net/?id=24772&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24772&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24772&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24772&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24772&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24772&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24772&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24772&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24772&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24772&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24772&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24772&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24772&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24772&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24772&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24772&r=gnused