From: David Eriksson Date: Thu, 9 Aug 2001 21:56:03 +0000 (+0000) Subject: Prevent potential crashes. X-Git-Tag: BEFORE_EXP_MERGE~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eeb26b89ec99ef9d052c71e65cca5eb2785e0d60;p=php Prevent potential crashes. --- 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 */