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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 03 02:00:01 2025 UTC