php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13107 php_ini.c:197 coding bug
Submitted: 2001-09-03 08:01 UTC Modified: 2001-09-03 11:36 UTC
From: nick at macaw dot demon dot co dot uk Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.6 OS: All
Private report: No CVE-ID: None
 [2001-09-03 08:01 UTC] nick at macaw dot demon dot co dot uk
Probably should be sizeof(char*) rather than sizeof(zval) here as zend extension paths are stored as a strings rather than zvals, as below. As a result the stack is blown on the resultant memcpy in the llist code.


zend_llist_init(&extension_lists.engine, sizeof(zval), (llist_dtor_func_t) free_estring, 1);
/*...*/
char *extension_name = estrndup(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2));
					
zend_llist_add_element(&extension_lists.engine, &extension_name);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-03 11:36 UTC] rasmus@php.net
Fixed - good catch
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC