|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2009-01-30 20:59 UTC] felipe@php.net
  [2009-02-03 15:36 UTC] a dot boykov at timeweb dot ru
  [2009-02-07 01:00 UTC] php-bugs at lists dot php dot net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 13:00:01 2025 UTC | 
Description: ------------ In function extract() not the length of a line key always is correctly defined. Sometimes it is calculated incorrectly and any following operation with this string leads to memory corruption. Here an example which has been received at debugging. name: bDescPageNumbering, len: 6276448 [Fri Jan 30 21:18:08 2009] [notice] child pid 19801 exit signal Segmentation fault (11) We are used this patch to fix problem: --- php-5.2.8/ext/standard/array.c 2009-01-30 21:23:25.000000000 +0300 +++ php-5.2.8/ext/standard/array.c 2009-01-30 21:24:35.000000000 +0300 @@ -1397,6 +1397,9 @@ key_type = zend_hash_get_current_key_ex(Z_ARRVAL_PP(var_array), &var_name, &var_name_len, &num_key, 0, &pos); var_exists = 0; + if (key_type == HASH_KEY_IS_STRING) + var_name_len = strlen(var_name); + if (key_type == HASH_KEY_IS_STRING) { var_name_len--; var_exists = zend_hash_exists(EG(active_symbol_table), var_name, var_name_len + 1); With this patch all works well, but I think it does not exclude a problem source. name: bDescPageNumbering, len: 18