cvs: php4 /ext/satellite class.c
| From: | David Eriksson | Date: | Thu, 09 Aug 2001 21:56:03 +0000 |
| Subject: | cvs: php4 /ext/satellite class.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6680@lists.php.net to get a copy of this message | ||
eriksson Thu Aug 9 17:56:03 2001 EDT
Modified files:
/php4/ext/satellite class.c
Log:
Prevent potential crashes.
Index: php4/ext/satellite/class.c
diff -u php4/ext/satellite/class.c:1.4 php4/ext/satellite/class.c:1.5
--- php4/ext/satellite/class.c:1.4 Mon Feb 26 01:07:15 2001
+++ php4/ext/satellite/class.c Thu Aug 9 17:56:02 2001
@@ -17,7 +17,7 @@
*/
/*
- * $Id: class.c,v 1.4 2001/02/26 06:07:15 andi Exp $
+ * $Id: class.c,v 1.5 2001/08/09 21:56:02 eriksson Exp $
* vim: syntax=c tabstop=2 shiftwidth=2
*/
@@ -53,6 +53,12 @@
/* 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 @@
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 */