SPL memory allocation problem
| From: | Stanislav Malyshev | Date: | Sun, 04 Dec 2005 09:52:43 +0000 |
| Subject: | SPL memory allocation problem | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-21030@lists.php.net to get a copy of this message | ||
In spl_iterators.c around line 320 (function spl_recursive_it_rewind_ex), there's the following code:
erealloc(object->iterators, sizeof(spl_sub_iterator));As we see, object->iterators is not assigned the result of realloc. As I can see, this may lead to a problem when erealloc returns different location then it was before. For me it happens when iterator is repeatedly applied to same object (i.e., multiple passes for same object, rewinding between them). So I think it needs to be fixed - I just wated to ask whoever is responsible for the code before I commit the fix if there was any idea behind not assigning erealloc result or it's just an omission. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115