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
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: nick at macaw dot demon dot co dot uk
New email:
PHP Version: OS:

 

 [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: Thu May 02 04:01:30 2024 UTC