diff options
| author | David Eriksson <eriksson@php.net> | 2001-08-09 21:56:03 +0000 |
|---|---|---|
| committer | David Eriksson <eriksson@php.net> | 2001-08-09 21:56:03 +0000 |
| commit | eeb26b89ec99ef9d052c71e65cca5eb2785e0d60 (patch) | |
| tree | a3c68e36beb1c563d231335fde0622c1a0d36cfd /ext/satellite/class.c | |
| parent | ece087b842df61a66b9bbadef97d159573c7fd81 (diff) | |
| download | php-git-eeb26b89ec99ef9d052c71e65cca5eb2785e0d60.tar.gz | |
Prevent potential crashes.
Diffstat (limited to 'ext/satellite/class.c')
| -rw-r--r-- | ext/satellite/class.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/satellite/class.c b/ext/satellite/class.c index 46419199d7..d258edfc3f 100644 --- a/ext/satellite/class.c +++ b/ext/satellite/class.c @@ -53,6 +53,12 @@ void orbit_class_function_call( /* TODO: handle error */ } + if (!object) + { + zend_error(E_WARNING, "Invalid Satellite class");\ + return; + } + /* constructor or normal function? */ if (zend_llist_count(pPropertyReference->elements_list) == 1 && !strcasecmp(function_name->element.value.str.val, pClass->name)) @@ -149,6 +155,9 @@ void * orbit_retrieve_data(const zval * php_object, int wanted_type) pval ** orbit_data_handle = NULL; int type = 0; + if (!php_object) + return NULL; + /* get handle to corba data */ zend_hash_index_find( php_object->value.obj.properties, /* hash table */ |
