php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39260 A misleading bit in the Zend API
Submitted: 2006-10-26 01:57 UTC Modified: 2006-10-26 09:29 UTC
From: sfox@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.2.0RC5 OS: irrelevant
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: sfox@php.net
New email:
PHP Version: OS:

 

 [2006-10-26 01:57 UTC] sfox@php.net
Description:
------------
Not the biggest bug in the world, more a mosquito...

In zend_compile.h:

ZEND_API int zend_unmangle_property_name(char *mangled_property, int mangled_property_len, char **prop_name, char **class_name);


In zend_compile.c:

ZEND_API int zend_unmangle_property_name(char *mangled_property, int len, char **class_name, char **prop_name)

Someone's obviously noticed this a long time ago - on SUCCESS we have:

	*class_name = mangled_property+1;
	*prop_name = (*class_name)+class_name_len;

and nobody writing for PECL seems to have made the obvious mistake (yet). But somebody, somewhere, will.

The declaration in the header file obviously needs changing to match the source file, and as for the implementation - well, it might just be nice to make it read more sanely :) If I trusted myself to do that without somehow messing it up along the way and breaking practically every extension out there, there'd be a patch with this report. I'm afraid I don't, sorry.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-26 09:29 UTC] tony2001@php.net
Fixed in HEAD, I'll MFH it as soon as 5.2 is open for commits again.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 04:01:34 2024 UTC