cvs: php4 /ext/satellite namedvalue_to_zval.c
| From: | David Eriksson | Date: | Thu, 09 Aug 2001 22:00:04 +0000 |
| Subject: | cvs: php4 /ext/satellite namedvalue_to_zval.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6684@lists.php.net to get a copy of this message | ||
eriksson Thu Aug 9 18:00:04 2001 EDT
Modified files:
/php4/ext/satellite namedvalue_to_zval.c
Log:
Prevent potential crash
Index: php4/ext/satellite/namedvalue_to_zval.c
diff -u php4/ext/satellite/namedvalue_to_zval.c:1.4 php4/ext/satellite/namedvalue_to_zval.c:1.5
--- php4/ext/satellite/namedvalue_to_zval.c:1.4 Mon Feb 26 01:07:15 2001
+++ php4/ext/satellite/namedvalue_to_zval.c Thu Aug 9 18:00:04 2001
@@ -17,7 +17,7 @@
*/
/*
- * $Id: namedvalue_to_zval.c,v 1.4 2001/02/26 06:07:15 andi Exp $
+ * $Id: namedvalue_to_zval.c,v 1.5 2001/08/09 22:00:04 eriksson Exp $
* vim: syntax=c tabstop=2 shiftwidth=2
*/
@@ -56,8 +56,15 @@
const CORBA_any * pSource, zval * pDestination)
{
CORBA_long * p_value = (CORBA_long *)pSource->_value;
- ZVAL_LONG(pDestination, *p_value);
- return TRUE;
+ if (p_value)
+ {
+ ZVAL_LONG(pDestination, *p_value);
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
}
static zend_bool satellite_any_to_zval_short(