#30543 [Opn->Asn]: Extending to self or parent makes php crash
| From: | tony2001@php.net | Date: | Sat, 23 Oct 2004 15:21:53 +0000 |
| Subject: | #30543 [Opn->Asn]: Extending to self or parent makes php crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-68013@lists.php.net to get a copy of this message | ||
ID: 30543
Updated by: tony2001@php.net
Reported By: jsgoupil at lookstrike dot com
-Status: Open
+Status: Assigned
-Bug Type: Reproducible crash
+Bug Type: Zend Engine 2 problem
Operating System: WinXP
PHP Version: 5.0.2
-Assigned To:
+Assigned To: andi
New Comment:
Andi, plz, review this fix:
Index: zend_execute_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute_API.c,v
retrieving revision 1.304
diff -u -r1.304 zend_execute_API.c
--- zend_execute_API.c 5 Oct 2004 06:53:39 -0000 1.304
+++ zend_execute_API.c 23 Oct 2004 15:20:05 -0000
@@ -884,6 +884,10 @@
char dummy = 1;
zend_fcall_info fcall_info;
zend_fcall_info_cache fcall_cache;
+
+ if (!name_length || !name) {
+ return FAILURE;
+ }
lc_name = do_alloca(name_length + 1);
zend_str_tolower_copy(lc_name, name, name_length);
Previous Comments:
------------------------------------------------------------------------
[2004-10-23 17:00:36] jsgoupil at lookstrike dot com
Description:
------------
Everything is in the summary. When extending a class to parent or self
(nobody does that uh :P ?), php crashes.
Reproduce code:
---------------
<?php
class a extends self {
}
?>
or
<?php
class a extends parent {
}
?>
Expected result:
----------------
Error like extending "extends" keyword ?
Actual result:
--------------
Crash !
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30543&edit=1